Esempio n. 1
0
        private void ShowButton_Click(object sender, EventArgs e)
        {
            try
            {
                if (FromDatefaDatePicker.IsNull)
                {
                    throw new ApplicationException("از تاریخ خالی است");
                }
                else if (ToDatefaDatePicker.IsNull)
                {
                    throw new ApplicationException("تا تاریخ خالی است");
                }
                else if (string.IsNullOrEmpty(Hepsa.Core.Common.PersentationController.GetMaskedTextBoxValue(FromTimeTextBox)))
                {
                    throw new ApplicationException("از ساعت خالی است");
                }

                else if (string.IsNullOrEmpty(Hepsa.Core.Common.PersentationController.GetMaskedTextBoxValue(ToTimeTextBox)))
                {
                    throw new ApplicationException("تا ساعت خالی است");
                }

                HPS.BLL.BLLPlateNumber_TFactory plateNumberFatory = new BLL.BLLPlateNumber_TFactory();
                DataTable trafficPicturesTable = new DataTable();
                plateNumberFatory.SelectInout(FromDatefaDatePicker.Text, FromTimeTextBox.Text, ToDatefaDatePicker.Text, ToTimeTextBox.Text, trafficPicturesTable);
                //TrafficPicturesGridView.SetDataBinding(trafficPicturesTable, "trafficPicturesTable");
                TrafficPicturesGridView.DataSource = trafficPicturesTable;
            }
            catch (Exception ex)
            {
                Hepsa.Core.Common.MessageBox.ErrorMessage(ex.Message);
            }
        }
Esempio n. 2
0
        private void ShowButton_Click(object sender, EventArgs e)
        {
            try
            {
                if (FromDatefaDatePicker.IsNull)
                {
                    throw new ApplicationException("از تاریخ خالی است");
                }
                else if (ToDatefaDatePicker.IsNull)
                {
                    throw new ApplicationException("تا تاریخ خالی است");
                }
                else if (string.IsNullOrEmpty(Hepsa.Core.Common.PersentationController.GetMaskedTextBoxValue(FromTimeTextBox)))
                {
                    throw new ApplicationException("از ساعت خالی است");
                }

                else if (string.IsNullOrEmpty(Hepsa.Core.Common.PersentationController.GetMaskedTextBoxValue(ToTimeTextBox)))
                {
                    throw new ApplicationException("تا ساعت خالی است");
                }

                HPS.BLL.BLLPlateNumber_TFactory plateNumberFatory = new BLL.BLLPlateNumber_TFactory();
                string    condition            = string.Format(" Date_vc>='{0}' AND Date_vc<='{1}' AND Time_vc>='{2}' AND Time_vc<='{3}' ", FromDatefaDatePicker.Text, ToDatefaDatePicker.Text, FromTimeTextBox.Text, ToTimeTextBox.Text);
                DataTable trafficPicturesTable = new DataTable();
                plateNumberFatory.GetAllByCondition(condition, ref trafficPicturesTable);
                TrafficPicturesGridView.SetDataBinding(trafficPicturesTable, "trafficPicturesTable");
            }
            catch (Exception ex)
            {
                Hepsa.Core.Common.MessageBox.ErrorMessage(ex.Message);
            }
        }
Esempio n. 3
0
 private void TrafficPicturesNotInTraffic_T_Load(object sender, EventArgs e)
 {
     try
     {
         HPS.BLL.BLLPlateNumber_TFactory PlateNumberFactory = new BLL.BLLPlateNumber_TFactory();
         TrafficPicturesGridView.SetDataBinding(PlateNumberFactory.SelectTrafficNotInTraffic_T(), "datatable");
     }
     catch (Exception ex)
     {
         Hepsa.Core.Common.MessageBox.ErrorMessage(ex.Message);
     }
 }