private void btnAddContact_Click(object sender, EventArgs e) { try { if (ObjESupplier.SupplierID > 0) { if (ObjESupplier == null) { ObjESupplier = new ESupplier(); } ObjESupplier.ContactPersonID = -1; frmSupplierMaster frm = new frmSupplierMaster("Contact"); frm.ObjEsupplier = ObjESupplier; frm.ShowDialog(); if (frm.DialogResult == DialogResult.OK) { BindContactData(ObjESupplier.SupplierID); Setfocus(gvContact, "ContactPersonID", ObjESupplier.ContactPersonID); if (Utility._IsGermany == true) { frmOTTOPro.UpdateStatus("Vorgang abgeschlossen: Speichern der Lieferanten-Kontaktdaten"); } else { frmOTTOPro.UpdateStatus("Supplier Contact saved successfully"); } } } } catch (Exception ex) { Utility.ShowError(ex); } }
private void gvAddress_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) { GetAddressDetails(); frmSupplierMaster frm = new frmSupplierMaster("Address"); frm.ObjEsupplier = ObjESupplier; frm.ShowDialog(); if (frm.DialogResult == DialogResult.OK) { BindAddressData(ObjESupplier.SupplierID); Setfocus(gvAddress, "AddressID", ObjESupplier.AddressID); } } } catch (Exception ex) { Utility.ShowError(ex); } }