This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// <summary> | |
| /// Validation provider by luhn Algorithm | |
| /// </summary> | |
| public static class CreditCardNumberExtention | |
| { | |
| public const int DIGIT_NUM = 16; | |
| public static bool IsValidCreditCardNumber(this string accountNumber) | |
| { | |
| if (String.IsNullOrEmpty(accountNumber)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public interface IFtpConnect | |
| { | |
| string[] GetFiles(); | |
| long GetFileSize(); | |
| void DownloadFile(string path); | |
| bool DeleteFile(); | |
| void UploadFile(string path); | |
| } | |
| public static class Bootstrapper |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class BaseModel | |
| { | |
| public Guid Id { get; set; } | |
| public DateTime CreateDate { get; set; } | |
| public bool IsActive { get; set; } | |
| public string LastUpdatingUserName { get; set; } | |
| public DateTime LastUpdatingDate { get; set; } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// <summary> | |
| /// possible layers | |
| /// </summary> | |
| public abstract class LayerDefinitions | |
| { | |
| public static string ServiceHostLayer { get { return "Sample.Service.Host"; } } | |
| public static string ServiceRepositorylayer { get { return "Sample.Service.Repository"; } } | |
| public static string CommonRepositorylayer { get { return "Sample.Common.Repository"; } } | |
| public static string DataAccessLayer { get { return "Sample.DataAccess"; } } | |
| public static string WebSecurityLayer { get { return "Sample.WebSecurity"; } } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Account | |
| { | |
| // set fields and properties | |
| } | |
| public class Customer | |
| { | |
| // set fields and properties | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Drawing; | |
| using System.Text.RegularExpressions; | |
| using System.Threading; | |
| using System.Windows.Forms; | |
| public class WebsiteThumbImage | |
| { | |
| public int ThumbWidth { get; set; } | |
| public int ThumbHeight { get; set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Object Structure | |
| [Serializable] | |
| public class BasePerson | |
| { | |
| public string SerialNo { get; set; } | |
| public Guid IdNo { get; set; } | |
| } | |
| [Serializable] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static class WebServiceExtention | |
| { | |
| public static bool isValidWebServiceUrl(this string url) | |
| { | |
| bool rv = true; | |
| if (String.IsNullOrEmpty(url)) | |
| rv = false; | |
| string Http_URL = HttpUtility.UrlDecode(url); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static class WebServiceExtention | |
| { | |
| public static bool isWebServiceRunning(this string url) | |
| { | |
| if (String.IsNullOrEmpty(url)) | |
| throw new ArgumentNullException(); | |
| try | |
| { | |
| var request = (HttpWebRequest)WebRequest.Create(url); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Scheduler | |
| { | |
| public Scheduler() { } | |
| public void Scheduler_Start() | |
| { | |
| TimerCallback callbackMinute = new TimerCallback(Jobs.WebServiceCheckJob); | |
| Timer minuteTimer = new Timer(callbackMinute, null, TimeSpan.Zero, TimeSpan.FromSeconds(10.0)); | |
| } | |
| } |