Esempio n. 1
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     try
     {
         frmUOM frm = new frmUOM(0);
         LBShowForm.ShowDialog(frm);
         LoadDataSource();
     }
     catch (Exception ex)
     {
         LB.WinFunction.LBCommonHelper.DealWithErrorMessage(ex);
     }
 }
Esempio n. 2
0
 private void GrdMain_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (e.RowIndex >= 0 && e.ColumnIndex >= 0)
         {
             DataRowView drvSelect = this.grdMain.Rows[e.RowIndex].DataBoundItem as DataRowView;
             long        lUOMID    = LBConverter.ToInt64(drvSelect["UOMID"]);
             if (lUOMID == 0)
             {
                 return;
             }
             frmUOM frm = new frmUOM(lUOMID);
             LBShowForm.ShowDialog(frm);
             LoadDataSource();
         }
     }
     catch (Exception ex)
     {
         LB.WinFunction.LBCommonHelper.DealWithErrorMessage(ex);
     }
 }
Esempio n. 3
0
 private void btnOpenEdit_Click(object sender, EventArgs e)
 {
     try
     {
         long lUOMID = 0;
         if (grdMain.CurrentRow != null)
         {
             DataRowView drv = grdMain.CurrentRow.DataBoundItem as DataRowView;
             lUOMID = LBConverter.ToInt64(drv["UOMID"]);
         }
         if (lUOMID == 0)
         {
             return;
         }
         frmUOM frm = new frmUOM(lUOMID);
         LBShowForm.ShowDialog(frm);
         LoadDataSource();
     }
     catch (Exception ex)
     {
         LB.WinFunction.LBCommonHelper.DealWithErrorMessage(ex);
     }
 }