public TCDatetime(DinhDang ip_dinhdang) { InitializeComponent(); this.ValidatingType = typeof(DateTime); switch (ip_dinhdang) { case DinhDang.dd_MM_yyyy: this.Mask = "00/00/0000"; break; case DinhDang.MM_yyyy: this.Mask = "00/0000"; break; default: this.Mask = "00/00/0000"; break; } this.Allow_Null = "N"; }
public TCDatetime(DinhDang ip_dinhdang,string ip_str_allow_null) { InitializeComponent(); this.ValidatingType = typeof(DateTime); switch (ip_dinhdang) { case DinhDang.dd_MM_yyyy: this.Mask = "00/00/0000"; break; case DinhDang.MM_yyyy: this.Mask = "00/0000"; break; default: this.Mask = "00/00/0000"; break; } if (ip_str_allow_null.ToUpper().Trim() == "N") this.Allow_Null = "N"; else this.Allow_Null = "Y"; }
public string getExt() { return(DinhDang.Substring(DinhDang.IndexOf("/") + 1)); }