Beispiel #1
0
        public void Update(HPS.BLL.DriverBLL.BLLDriver_T businessObject, HPS.BLL.DriverBLL.BLLDriver_TKeys businessObjectKey)
        {
            try
            {
                if (businessObject.DriverID_bint == businessObjectKey.DriverID_bint)
                {
                    if (businessObject.IsValid(Hepsa.Core.Validation.ValidationExceptionType.Except, "UniqueDriverID_bint") == false)
                    {
                        throw new Hepsa.Core.Validation.InvalidBusinessObjectException(businessObject.BrokenRulesList().ToString());
                    }
                }
                else
                {
                    if (businessObject.IsValid() == false)
                    {
                        throw new Hepsa.Core.Validation.InvalidBusinessObjectException(businessObject.BrokenRulesList().ToString());
                    }
                }

                _dataObject.Update(businessObject, businessObjectKey);
            }
            catch (System.Exception ex)
            {
                throw Hepsa.Core.Exception.HandleException.ChangeExceptionLanguage(ex, this);
            }
        }
Beispiel #2
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);
     }
 }
Beispiel #3
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;
     }
 }
Beispiel #4
0
 protected override void Edit()
 {
     HPS.BLL.DriverBLL.BLLDriver_TFactory DriverFactory = new HPS.BLL.DriverBLL.BLLDriver_TFactory();
     try
     {
         HPS.BLL.DriverBLL.BLLDriver_T DriverEntity = new HPS.BLL.DriverBLL.BLLDriver_T();
         DriverEntity.DriverCardDate_nvc    = Hepsa.Core.Common.PersentationController.GetEntityValue(DriverCardDate_nvcTextBox.Text, TypeCode.String).ToString();
         DriverEntity.DriverCardNumber_nvc  = Hepsa.Core.Common.PersentationController.GetEntityValue(DriverCardNumber_nvcTextBox.Text, TypeCode.String).ToString();
         DriverEntity.DriverType_nvc        = Hepsa.Core.Common.PersentationController.GetEntityValue(DriverType_nvcTextBox.Text, TypeCode.String).ToString();
         DriverEntity.FirstName_nvc         = Hepsa.Core.Common.PersentationController.GetEntityValue(FirstName_nvcTextBox.Text, TypeCode.String).ToString();
         DriverEntity.LastName_nvc          = Hepsa.Core.Common.PersentationController.GetEntityValue(LastName_nvcTextBox.Text, TypeCode.String).ToString();
         DriverEntity.InsuranceNumber_nvc   = Hepsa.Core.Common.PersentationController.GetEntityValue(InsuranceNumber_nvcTextBox.Text, TypeCode.String).ToString();
         DriverEntity.CityID_int            = (Nullable <Int32>)Hepsa.Core.Common.PersentationController.GetEntityValue(CityID_intComboBox.SelectedValue, TypeCode.Int32);
         DriverEntity.CityCode_nvc          = Hepsa.Core.Common.PersentationController.GetEntityValue(CityCode_nvcTextBox.Text, TypeCode.String).ToString();
         DriverEntity.licenceNumber_nvc     = Hepsa.Core.Common.PersentationController.GetEntityValue(licenceNumber_nvcTextBox.Text, TypeCode.String).ToString();
         DriverEntity.LicenceCityID_int     = (Nullable <Int32>)Hepsa.Core.Common.PersentationController.GetEntityValue(LicenceCityID_intComboBox.SelectedValue, TypeCode.Int32);
         DriverEntity.LicenceType_nvc       = Hepsa.Core.Common.PersentationController.GetEntityValue(LicenceType_nvcTextBox.Text, TypeCode.String).ToString();
         DriverEntity.LiceniceDate_nvc      = Hepsa.Core.Common.PersentationController.GetEntityValue(LiceniceDate_nvcTextBox.Text, TypeCode.String).ToString();
         DriverEntity.ActivityScope_nvc     = Hepsa.Core.Common.PersentationController.GetEntityValue(ActivityScope_nvcTextBox.Text, TypeCode.String).ToString();
         DriverEntity.NationalCode_int      = (Nullable <Int64>)Hepsa.Core.Common.PersentationController.GetEntityValue(NationalCode_intNumericTextBox.NumericText, TypeCode.Int64);
         DriverEntity.Active_bit            = Active_bitCheckBox.Checked;
         DriverEntity.InfractionGroupID_int = (Nullable <Int32>)Hepsa.Core.Common.PersentationController.GetEntityValue(InfractionGroupID_intComboBox.SelectedValue, TypeCode.Int32);
         DriverEntity.DocNumber_nvc         = Hepsa.Core.Common.PersentationController.GetEntityValue(DocNumber_nvcTextBox.Text, TypeCode.String).ToString();
         DriverEntity.InsertDate_nvc        = Hepsa.Core.Common.PersentationController.GetEntityValue(InsertDate_nvcTextBox.Text, TypeCode.String).ToString();
         DriverEntity.UpdateDate_nvc        = Hepsa.Core.Common.PersentationController.GetEntityValue(UpdateDate_nvcTextBox.Text, TypeCode.String).ToString();
         DriverEntity.Deleted_bit           = Deleted_bitCheckBox.Checked;
         DriverEntity.Mobile_nvc            = Hepsa.Core.Common.PersentationController.GetEntityValue(Mobile_nvctextBox.Text, TypeCode.String).ToString();
         DriverEntity.Active_bit            = Active_bit.Checked;
         if (Hepsa.Core.Common.MessageBox.ConfirmMessage(HPS.Exceptions.ExceptionCs.EditMessage) == true)
         {
             DriverFactory.BeginProc();
             DriverFactory.Update(DriverEntity, (HPS.BLL.DriverBLL.BLLDriver_TKeys)Key);
             DriverFactory.CommitProc();
             if (DataTable != null)
             {
                 DataRow[] dr = DataTable.Select(HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.DriverID_bint.ToString() + "='" + ((HPS.BLL.DriverBLL.BLLDriver_TKeys)Key).DriverID_bint.ToString() + "'");
                 if (dr.Length > 0)
                 {
                     dr[0][HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.DriverCardDate_nvc.ToString()]   = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.DriverCardDate_nvc, TypeCode.String);
                     dr[0][HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.DriverCardNumber_nvc.ToString()] = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.DriverCardNumber_nvc, TypeCode.String);
                     dr[0][HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.DriverType_nvc.ToString()]       = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.DriverType_nvc, TypeCode.String);
                     dr[0][HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.FirstName_nvc.ToString()]        = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.FirstName_nvc, TypeCode.String);
                     dr[0][HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.LastName_nvc.ToString()]         = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.LastName_nvc, TypeCode.String);
                     dr[0][HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.InsuranceNumber_nvc.ToString()]  = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.InsuranceNumber_nvc, TypeCode.String);
                     dr[0]["CityID_intCity_nvc"] = Hepsa.Core.Common.PersentationController.GetComboBoxDisplayMember(CityID_intComboBox);
                     dr[0][HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.CityCode_nvc.ToString()]      = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.CityCode_nvc, TypeCode.String);
                     dr[0][HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.licenceNumber_nvc.ToString()] = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.licenceNumber_nvc, TypeCode.String);
                     dr[0]["LicenceCityID_intCity_nvc"] = Hepsa.Core.Common.PersentationController.GetComboBoxDisplayMember(LicenceCityID_intComboBox);
                     dr[0][HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.LicenceType_nvc.ToString()]   = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.LicenceType_nvc, TypeCode.String);
                     dr[0][HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.LiceniceDate_nvc.ToString()]  = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.LiceniceDate_nvc, TypeCode.String);
                     dr[0][HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.ActivityScope_nvc.ToString()] = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.ActivityScope_nvc, TypeCode.String);
                     dr[0][HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.NationalCode_int.ToString()]  = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.NationalCode_int, TypeCode.Int64);
                     dr[0][HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.Active_bit.ToString()]        = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.Active_bit, TypeCode.Boolean);
                     dr[0]["InfractionGroupID_intInfractionGroup_nvc"] = Hepsa.Core.Common.PersentationController.GetComboBoxDisplayMember(InfractionGroupID_intComboBox);
                     dr[0][HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.DocNumber_nvc.ToString()]  = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.DocNumber_nvc, TypeCode.String);
                     dr[0][HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.InsertDate_nvc.ToString()] = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.InsertDate_nvc, TypeCode.String);
                     dr[0][HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.UpdateDate_nvc.ToString()] = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.UpdateDate_nvc, TypeCode.String);
                     dr[0][HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.Deleted_bit.ToString()]    = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.Deleted_bit, TypeCode.Boolean);
                 }
                 DataTable.AcceptChanges();
             }
         }
     }
     catch (Exception ex)
     {
         DriverFactory.RollBackProc();
         throw ex;
     }
 }
Beispiel #5
0
        protected override void Insert()
        {
            HPS.BLL.DriverBLL.BLLDriver_TFactory DriverFactory = new HPS.BLL.DriverBLL.BLLDriver_TFactory();
            if (online)
            {
                var driver = DriverFactory.GetAllBy(BLL.DriverBLL.BLLDriver_T.Driver_TField.DriverCardNumber_nvc, DriverCardNumber_nvcTextBox.Text);
                if (driver.Count > 0)
                {
                    Edit();
                    return;
                }
            }
            try
            {
                HPS.BLL.DriverBLL.BLLDriver_T DriverEntity = new HPS.BLL.DriverBLL.BLLDriver_T();
                DriverEntity.DriverCardDate_nvc    = Hepsa.Core.Common.PersentationController.GetEntityValue(DriverCardDate_nvcTextBox.Text, TypeCode.String).ToString();
                DriverEntity.DriverCardNumber_nvc  = Hepsa.Core.Common.PersentationController.GetEntityValue(DriverCardNumber_nvcTextBox.Text, TypeCode.String).ToString();
                DriverEntity.DriverType_nvc        = Hepsa.Core.Common.PersentationController.GetEntityValue(DriverType_nvcTextBox.Text, TypeCode.String).ToString();
                DriverEntity.FirstName_nvc         = Hepsa.Core.Common.PersentationController.GetEntityValue(FirstName_nvcTextBox.Text, TypeCode.String).ToString();
                DriverEntity.LastName_nvc          = Hepsa.Core.Common.PersentationController.GetEntityValue(LastName_nvcTextBox.Text, TypeCode.String).ToString();
                DriverEntity.InsuranceNumber_nvc   = Hepsa.Core.Common.PersentationController.GetEntityValue(InsuranceNumber_nvcTextBox.Text, TypeCode.String).ToString();
                DriverEntity.CityID_int            = (Nullable <Int32>)Hepsa.Core.Common.PersentationController.GetEntityValue(CityID_intComboBox.SelectedValue, TypeCode.Int32);
                DriverEntity.CityCode_nvc          = Hepsa.Core.Common.PersentationController.GetEntityValue(CityCode_nvcTextBox.Text, TypeCode.String).ToString();
                DriverEntity.licenceNumber_nvc     = Hepsa.Core.Common.PersentationController.GetEntityValue(licenceNumber_nvcTextBox.Text, TypeCode.String).ToString();
                DriverEntity.LicenceCityID_int     = (Nullable <Int32>)Hepsa.Core.Common.PersentationController.GetEntityValue(LicenceCityID_intComboBox.SelectedValue, TypeCode.Int32);
                DriverEntity.LicenceType_nvc       = Hepsa.Core.Common.PersentationController.GetEntityValue(LicenceType_nvcTextBox.Text, TypeCode.String).ToString();
                DriverEntity.LiceniceDate_nvc      = Hepsa.Core.Common.PersentationController.GetEntityValue(LiceniceDate_nvcTextBox.Text, TypeCode.String).ToString();
                DriverEntity.ActivityScope_nvc     = Hepsa.Core.Common.PersentationController.GetEntityValue(ActivityScope_nvcTextBox.Text, TypeCode.String).ToString();
                DriverEntity.NationalCode_int      = (Nullable <Int64>)Hepsa.Core.Common.PersentationController.GetEntityValue(NationalCode_intNumericTextBox.NumericText, TypeCode.Int64);
                DriverEntity.Active_bit            = Active_bitCheckBox.Checked;
                DriverEntity.InfractionGroupID_int = (Nullable <Int32>)Hepsa.Core.Common.PersentationController.GetEntityValue(InfractionGroupID_intComboBox.SelectedValue, TypeCode.Int32);
                DriverEntity.DocNumber_nvc         = Hepsa.Core.Common.PersentationController.GetEntityValue(DocNumber_nvcTextBox.Text, TypeCode.String).ToString();
                DriverEntity.InsertDate_nvc        = Hepsa.Core.Common.PersentationController.GetEntityValue(InsertDate_nvcTextBox.Text, TypeCode.String).ToString();
                DriverEntity.UpdateDate_nvc        = Hepsa.Core.Common.PersentationController.GetEntityValue(UpdateDate_nvcTextBox.Text, TypeCode.String).ToString();
                DriverEntity.Deleted_bit           = Deleted_bitCheckBox.Checked;
                DriverEntity.Mobile_nvc            = Hepsa.Core.Common.PersentationController.GetEntityValue(Mobile_nvctextBox.Text, TypeCode.String).ToString();
                DriverEntity.Active_bit            = Active_bit.Checked;

                DriverFactory.BeginProc();
                DriverFactory.Insert(DriverEntity);
                DriverFactory.CommitProc();
                if (DataTable != null)
                {
                    DataRow dr = this.DataTable.NewRow();
                    dr[HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.DriverID_bint.ToString()]        = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.DriverID_bint, TypeCode.Int64);
                    dr[HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.DriverCardDate_nvc.ToString()]   = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.DriverCardDate_nvc, TypeCode.String);
                    dr[HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.DriverCardNumber_nvc.ToString()] = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.DriverCardNumber_nvc, TypeCode.String);
                    dr[HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.DriverType_nvc.ToString()]       = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.DriverType_nvc, TypeCode.String);
                    dr[HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.FirstName_nvc.ToString()]        = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.FirstName_nvc, TypeCode.String);
                    dr[HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.LastName_nvc.ToString()]         = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.LastName_nvc, TypeCode.String);
                    dr[HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.InsuranceNumber_nvc.ToString()]  = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.InsuranceNumber_nvc, TypeCode.String);
                    dr[HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.CityID_int.ToString()]           = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.CityID_int, TypeCode.Int32);
                    dr["CityID_intCity_nvc"] = Hepsa.Core.Common.PersentationController.GetComboBoxDisplayMember(CityID_intComboBox);
                    dr[HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.CityCode_nvc.ToString()]      = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.CityCode_nvc, TypeCode.String);
                    dr[HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.licenceNumber_nvc.ToString()] = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.licenceNumber_nvc, TypeCode.String);
                    dr[HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.LicenceCityID_int.ToString()] = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.LicenceCityID_int, TypeCode.Int32);
                    dr["LicenceCityID_intCity_nvc"] = Hepsa.Core.Common.PersentationController.GetComboBoxDisplayMember(LicenceCityID_intComboBox);
                    dr[HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.LicenceType_nvc.ToString()]       = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.LicenceType_nvc, TypeCode.String);
                    dr[HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.LiceniceDate_nvc.ToString()]      = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.LiceniceDate_nvc, TypeCode.String);
                    dr[HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.ActivityScope_nvc.ToString()]     = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.ActivityScope_nvc, TypeCode.String);
                    dr[HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.NationalCode_int.ToString()]      = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.NationalCode_int, TypeCode.Int64);
                    dr[HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.Active_bit.ToString()]            = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.Active_bit, TypeCode.Boolean);
                    dr[HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.InfractionGroupID_int.ToString()] = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.InfractionGroupID_int, TypeCode.Int32);
                    dr["InfractionGroupID_intInfractionGroup_nvc"] = Hepsa.Core.Common.PersentationController.GetComboBoxDisplayMember(InfractionGroupID_intComboBox);
                    dr[HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.DocNumber_nvc.ToString()]  = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.DocNumber_nvc, TypeCode.String);
                    dr[HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.InsertDate_nvc.ToString()] = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.InsertDate_nvc, TypeCode.String);
                    dr[HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.UpdateDate_nvc.ToString()] = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.UpdateDate_nvc, TypeCode.String);
                    dr[HPS.BLL.DriverBLL.BLLDriver_T.Driver_TField.Deleted_bit.ToString()]    = Hepsa.Core.Common.PersentationController.GetEntityValueInDatabaseFormat(DriverEntity.Deleted_bit, TypeCode.Boolean);

                    DataTable.Rows.Add(dr);
                    DataTable.AcceptChanges();
                }
                this.ClearForm(this);
            }
            catch (Exception ex)
            {
                DriverFactory.RollBackProc();
                throw ex;
            }
        }