Exemple #1
0
 private void SearchButton_Click(object sender, EventArgs e)
 {
     try
     {
         if (DriverGridView.CurrentRow != null)
         {
             HPS.BLL.DriverBLL.BLLDriver_TFactory DriverFactory = new HPS.BLL.DriverBLL.BLLDriver_TFactory();
             HPS.BLL.DriverBLL.BLLDriver_TKeys    DriverKey     = new HPS.BLL.DriverBLL.BLLDriver_TKeys();
             DriverKey.DriverID_bint = (Int64)DriverGridView.CurrentRow.Cells[colDriverID_bint.Name].Value;
             DriverEntity            = DriverFactory.GetBy(DriverKey);
         }
         this.DialogResult = DialogResult.OK;
         this.Close();
     }
     catch (Exception ex)
     {
         Hepsa.Core.Common.MessageBox.ErrorMessage(ex.Message);
     }
 }
Exemple #2
0
 protected override void ShowForm()
 {
     try
     {
         this.FillCombo();
         HPS.BLL.DriverBLL.BLLDriver_TFactory DriverFactory = new HPS.BLL.DriverBLL.BLLDriver_TFactory();
         HPS.BLL.DriverBLL.BLLDriver_T        DriverEntity  = DriverFactory.GetBy((HPS.BLL.DriverBLL.BLLDriver_TKeys)Key);
         if (DriverEntity == null)
         {
             throw new HPS.Exceptions.DriverNotFound();
         }
         DriverCardDate_nvcTextBox.Text   = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(DriverEntity.DriverCardDate_nvc, TypeCode.String));
         DriverCardNumber_nvcTextBox.Text = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(DriverEntity.DriverCardNumber_nvc, TypeCode.String));
         DriverType_nvcTextBox.Text       = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(DriverEntity.DriverType_nvc, TypeCode.String));
         FirstName_nvcTextBox.Text        = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(DriverEntity.FirstName_nvc, TypeCode.String));
         LastName_nvcTextBox.Text         = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(DriverEntity.LastName_nvc, TypeCode.String));
         InsuranceNumber_nvcTextBox.Text  = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(DriverEntity.InsuranceNumber_nvc, TypeCode.String));
         Hepsa.Core.Common.PersentationController.SetComboBoxValue(ref CityID_intComboBox, DriverEntity.CityID_int, TypeCode.Int32);
         CityCode_nvcTextBox.Text      = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(DriverEntity.CityCode_nvc, TypeCode.String));
         licenceNumber_nvcTextBox.Text = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(DriverEntity.licenceNumber_nvc, TypeCode.String));
         Hepsa.Core.Common.PersentationController.SetComboBoxValue(ref LicenceCityID_intComboBox, DriverEntity.LicenceCityID_int, TypeCode.Int32);
         LicenceType_nvcTextBox.Text         = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(DriverEntity.LicenceType_nvc, TypeCode.String));
         LiceniceDate_nvcTextBox.Text        = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(DriverEntity.LiceniceDate_nvc, TypeCode.String));
         ActivityScope_nvcTextBox.Text       = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(DriverEntity.ActivityScope_nvc, TypeCode.String));
         NationalCode_intNumericTextBox.Text = Hepsa.Core.Common.PersentationController.GetEntityValue(DriverEntity.NationalCode_int, TypeCode.Int64).ToString();
         Active_bitCheckBox.Checked          = (Boolean)Hepsa.Core.Common.PersentationController.GetEntityValue(DriverEntity.Active_bit, TypeCode.Boolean);
         Hepsa.Core.Common.PersentationController.SetComboBoxValue(ref InfractionGroupID_intComboBox, DriverEntity.InfractionGroupID_int, TypeCode.Int32);
         DocNumber_nvcTextBox.Text   = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(DriverEntity.DocNumber_nvc, TypeCode.String));
         InsertDate_nvcTextBox.Text  = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(DriverEntity.InsertDate_nvc, TypeCode.String));
         UpdateDate_nvcTextBox.Text  = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(DriverEntity.UpdateDate_nvc, TypeCode.String));
         Deleted_bitCheckBox.Checked = (Boolean)Hepsa.Core.Common.PersentationController.GetEntityValue(DriverEntity.Deleted_bit, TypeCode.Boolean);
         Mobile_nvctextBox.Text      = Hepsa.Core.Common.PersentationController.GetEntityValue(DriverEntity.Mobile_nvc, TypeCode.String).ToString();
         Active_bit.Checked          = Convert.ToBoolean(Hepsa.Core.Common.PersentationController.GetEntityValue(DriverEntity.Active_bit, TypeCode.Boolean));
     }
     catch (Exception)
     {
         throw;
     }
 }