예제 #1
0
        private void btnCreateMachine_Click(object sender, EventArgs e)
        {
            frmAddEditMachineHyp frm = new frmAddEditMachineHyp(cGlobalVariables.Add);

            if (frm.ShowDialog() == DialogResult.OK)
            {
                LoadMachine();
            }
        }
예제 #2
0
        private void btnEditMachine_Click(object sender, EventArgs e)
        {
            int id = TextUtils.ToInt(gvMachine.GetFocusedRowCellValue(colIDMac));

            if (id == 0)
            {
                return;
            }
            prevRow = gvMachine.GetSelectedRows()[0];
            MachineModel model = (MachineModel)MachineBO.Instance.FindByPK(id);

            frmAddEditMachineHyp frm = new frmAddEditMachineHyp(cGlobalVariables.Edit);

            frm.machineModel = model;
            if (frm.ShowDialog() == DialogResult.OK)
            {
                LoadMachine();
                gvMachine.FocusedRowHandle = prevRow;
            }
        }