Esempio n. 1
0
        private void LoadSMSLog()
        {
            try
            {
                HPS.BLL.BLLSmsInfo_TFactory SmsFactory = new HPS.BLL.BLLSmsInfo_TFactory();
                DataTable smsLogDataTable = new DataTable();

                Hepsa.Core.Validation.DateRule <string> FromDateValidator = new Hepsa.Core.Validation.DateRule <string>("FromDate", "از تاریخ", null, null);
                if (FromDateValidator.Validate(FromDatetextBox.Text) == false)
                {
                    throw new ApplicationException(FromDateValidator.Description);
                }

                Hepsa.Core.Validation.DateRule <string> ToDateValidator = new Hepsa.Core.Validation.DateRule <string>("FromDate", "از تاریخ", null, null);
                if (ToDateValidator.Validate(TodatetextBox.Text) == false)
                {
                    throw new ApplicationException(ToDateValidator.Description);
                }

                SmsFactory.SelectSmsLog(FromDatetextBox.Text, TodatetextBox.Text, smsLogDataTable);
                this.SMSGridView.DataSource = smsLogDataTable;
            }
            catch (Exception ex)
            {
                Hepsa.Core.Common.MessageBox.ErrorMessage(ex.Message);
            }
        }
Esempio n. 2
0
 private void SMSLogForm_Load(object sender, EventArgs e)
 {
     HPS.BLL.BLLSmsInfo_TFactory SmsFactory = new HPS.BLL.BLLSmsInfo_TFactory();
     FromDatetextBox.Text = SmsFactory.ServerJalaliDate.ToString();
     TodatetextBox.Text   = SmsFactory.ServerJalaliDate.ToString();
     LoadSMSLog();
 }