private void NewEditForm() { DepartmentEdit depart = new DepartmentEdit("insert", this); depart.txtDepID.Text = (DepartmentDao.Instace().GetLastID() + 1).ToString(); depart.txtDepID.IsReadOnly = true; depart.Show(); }
private void ShowEditForm(DEPARTMENT p) { if (p != null) { DepartmentEdit depart = new DepartmentEdit("update", this); depart.Show(); depart.txtDepID.Text = p.DEPT_ID.ToString(); depart.txtDepID.IsReadOnly = true; depart.txtName.Text = p.NAME; } }