Ejemplo n.º 1
0
 private void btnAddArticles_Click(object sender, EventArgs e)
 {
     try
     {
         if (ObjESupplier.SupplierID > 0)
         {
             if (ObjESupplier == null)
             {
                 ObjESupplier = new ESupplier();
             }
             ObjESupplier.WGWAID = -1;
             frmSaveArticle frm = new frmSaveArticle();
             frm.ObjEsupplier = ObjESupplier;
             frm.ShowDialog();
             if (frm.DialogResult == DialogResult.OK)
             {
                 BindArticleData(ObjESupplier.SupplierID);
                 Setfocus(gvArticles, "WGWAID", ObjESupplier.WGWAID);
                 if (Utility._IsGermany == true)
                 {
                     frmOTTOPro.UpdateStatus("Vorgang abgeschlossen: Speichern des Artikels");
                 }
                 else
                 {
                     frmOTTOPro.UpdateStatus("Article saved successfully");
                 }
             }
         }
     }
     catch (Exception ex) { Utility.ShowError(ex); }
 }
Ejemplo n.º 2
0
 private void gvArticles_DoubleClick(object sender, EventArgs e)
 {
     try
     {
         GridView    view = (GridView)sender;
         Point       pt   = view.GridControl.PointToClient(Control.MousePosition);
         GridHitInfo info = view.CalcHitInfo(pt);
         if (info.InRow || info.InRowCell)
         {
             GetArticleDetails();
             frmSaveArticle frm = new frmSaveArticle();
             frm.ObjEsupplier = ObjESupplier;
             frm.ShowDialog();
             if (frm.DialogResult == DialogResult.OK)
             {
                 BindArticleData(ObjESupplier.SupplierID);
                 Setfocus(gvArticles, "WGWAID", ObjESupplier.WGWAID);
             }
         }
     }
     catch (Exception ex) { Utility.ShowError(ex); }
 }