示例#1
0
        private void btnNew_Click(object sender, EventArgs e)
        {
            frmGearWorkingDetail frm = new frmGearWorkingDetail();

            frm.GearID = TextUtils.ToInt(grvData.GetFocusedRowCellValue(colID));
            if (frm.ShowDialog() == DialogResult.OK)
            {
                LoadGearWorking();
            }
        }
示例#2
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     try
     {
         int id = TextUtils.ToInt(grvDetail.GetFocusedRowCellValue(colID2));
         if (id == 0)
         {
             return;
         }
         GearWorkingModel     model = (GearWorkingModel)GearWorkingBO.Instance.FindByPK(id);
         frmGearWorkingDetail frm   = new frmGearWorkingDetail();
         int gearID = TextUtils.ToInt(grvDetail.GetFocusedRowCellValue(colGearID));
         frm.GearWorking = model;
         frm.GearID      = gearID;
         if (frm.ShowDialog() == DialogResult.OK)
         {
             LoadGearWorking();
         }
     }
     catch (Exception ex)
     {
     }
 }