Ejemplo n.º 1
0
 private void _leCompanyID_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
 {
     if (e.Button.Tag.ToString() == "New")
     {
         Form fr = new BaseForm.frCompany();
         fr.ShowDialog();
         dtCom = BasicClass.BaseTableClass.dtCompany.Copy();
         DataRow dr = dtCom.NewRow();
         dr["ID"]   = 0;
         dr["Name"] = string.Empty;
         dtCom.Rows.InsertAt(dr, 0);
         _leCompanyID.Properties.DataSource = dtCom;
         _leCompanyID.EditValue             = _companyID;
     }
 }
Ejemplo n.º 2
0
 private void lookUpEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
 {
     if (e.Button.Tag.ToString() == "New")
     {
         ClickButton(r, _fr);
         if (_fr == (int)BasicClass.Enums.TableType.Product)
         {
             Form fr = new BaseForm.frFinished(r, -1);
             fr.ShowDialog();
         }
         else if (_fr == (int)BasicClass.Enums.TableType.Brand)
         {
             Form fr = new BaseForm.frBrandList(r, -1);
             fr.ShowDialog();
         }
         else if (_fr == (int)BasicClass.Enums.TableType.Company)
         {
             Form fr = new BaseForm.frCompany(r, -1);
             fr.ShowDialog();
         }
     }
 }