Esempio n. 1
0
        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";
        }
Esempio n. 2
0
        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";
        }
Esempio n. 3
0
 public string getExt()
 {
     return(DinhDang.Substring(DinhDang.IndexOf("/") + 1));
 }