Exemplo n.º 1
0
        private void SearchButton_Click(object sender, EventArgs e)
        {
            if (CompanyGridView.CurrentRow != null)
            {
                HPS.BLL.CompanyBLL.BLLCompany_TFactory CompanyFactory = new HPS.BLL.CompanyBLL.BLLCompany_TFactory();
                HPS.BLL.CompanyBLL.BLLCompany_TKeys    CompanyKey     = new HPS.BLL.CompanyBLL.BLLCompany_TKeys();
                CompanyKey.CompanyID_int = (Int32)CompanyGridView.CurrentRow.Cells[colCompanyID_int.Name].Value;
                CompanyEntity            = CompanyFactory.GetBy(CompanyKey);

                if (string.IsNullOrEmpty(Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyGridView.CurrentRow.Cells[colCompanyID_int.Name].Value, TypeCode.String).ToString()) == false)
                {
                    CompanyEntity.Company_nvc = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyGridView.CurrentRow.Cells[colCompany_nvc.Name].Value, TypeCode.String));
                }
            }
            this.Close();
        }
Exemplo n.º 2
0
 protected override void ShowForm()
 {
     this.FillCombo();
     HPS.BLL.CompanyBLL.BLLCompany_TFactory CompanyFactory = new HPS.BLL.CompanyBLL.BLLCompany_TFactory();
     HPS.BLL.CompanyBLL.BLLCompany_T        CompanyEntity  = CompanyFactory.GetBy((HPS.BLL.CompanyBLL.BLLCompany_TKeys)Key);
     if (CompanyEntity == null)
     {
         throw new HPS.Exceptions.CompanyNotFound();
     }
     CompanyCode_nvcTextBox.Text    = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyEntity.CompanyCode_nvc, TypeCode.String));
     Company_nvcTextBox.Text        = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyEntity.Company_nvc, TypeCode.String));
     DirectorName_nvcTextBox.Text   = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyEntity.DirectorName_nvc, TypeCode.String));
     DirectorMobile_nvcTextBox.Text = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyEntity.DirectorMobile_nvc, TypeCode.String));
     Phone_nvcTextBox.Text          = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyEntity.Phone_nvc, TypeCode.String));
     Fax_nvcTextBox.Text            = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyEntity.Fax_nvc, TypeCode.String));
     Email_nvcTextBox.Text          = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyEntity.Email_nvc, TypeCode.String));
     WebAddress_nvcTextBox.Text     = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyEntity.WebAddress_nvc, TypeCode.String));
     Active_bitCheckBox.Checked     = (Boolean)Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyEntity.Active_bit, TypeCode.Boolean);
     Hepsa.Core.Common.PersentationController.SetComboBoxValue(ref InfractionGroupID_intComboBox, CompanyEntity.InfractionGroupID_int, TypeCode.Int32);
     Address_nvcTextBox.Text = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyEntity.Address_nvc, TypeCode.String));
     Hepsa.Core.Common.PersentationController.SetComboBoxValue(ref CityID_intComboBox, CompanyEntity.CityID_int, TypeCode.Int32);
     CityCode_nvcTextBox.Text = Convert.ToString(Hepsa.Core.Common.PersentationController.GetEntityValue(CompanyEntity.CityCode_nvc, TypeCode.String));
 }