Beispiel #1
0
 private void btnEdit_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
 {
     try
     {
         if (gvGST.FocusedRowHandle >= 0)
         {
             ObjGST         = new GST();
             ObjGST.GSTID   = gvGST.GetFocusedRowCellValue("GSTID");
             ObjGST.GSTCODE = gvGST.GetFocusedRowCellValue("GSTCODE");
             ObjGST.CGST    = gvGST.GetFocusedRowCellValue("CGST");
             ObjGST.SGST    = gvGST.GetFocusedRowCellValue("SGST");
             ObjGST.IGST    = gvGST.GetFocusedRowCellValue("IGST");
             ObjGST.CESS    = gvGST.GetFocusedRowCellValue("CESS");
             frmGST obj = new frmGST(ObjGST);
             obj.ShowInTaskbar        = false;
             obj.StartPosition        = FormStartPosition.CenterScreen;
             obj.IconOptions.ShowIcon = false;
             obj.ShowDialog();
             if (ObjGST.IsSave)
             {
                 gcGST.DataSource = objMasterRep.GetGST();
                 Utility.Setfocus(gvGST, "GSTID", ObjGST.GSTID);
             }
         }
     }
     catch (Exception ex)
     {
         ErrorMgmt.ShowError(ex);
         ErrorMgmt.Errorlog.Error(ex);
     }
 }
Beispiel #2
0
        private void btnNew_Click(object sender, EventArgs e)
        {
            ObjGST = new GST();
            frmGST obj = new frmGST(ObjGST);

            obj.ShowInTaskbar        = false;
            obj.StartPosition        = FormStartPosition.CenterScreen;
            obj.IconOptions.ShowIcon = false;
            obj.ShowDialog();
            if (ObjGST.IsSave)
            {
                gcGST.DataSource = objMasterRep.GetGST();
                Utility.Setfocus(gvGST, "GSTID", ObjGST.GSTID);
            }
        }