示例#1
0
        private void gvEmpList_RowHeaderMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            fmEmpEdit fEdit = new fmEmpEdit();

            fEdit.empID = gvEmpList.Rows[e.RowIndex].Cells[0].Value.ToString();
            fEdit.ShowDialog();
            LoadEmployeeGrid();
        }
示例#2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            Employee emp = new Employee();

            emp.FirstName  = "New";
            emp.Branch     = GetBranch();
            emp.QBFile     = GetCompany();
            emp.EmployeeID = new ModelToSQL <Employee>().WriteInsertSQL("Employee", emp, "EmployeeID", CommonProcs.WCompanyConnStr);
            fmEmpEdit fEdit = new fmEmpEdit();

            fEdit.empID = emp.EmployeeID.ToString();
            fEdit.ShowDialog();
            LoadEmployeeGrid();
        }