private void Clear_btn_Click(object sender, EventArgs e) { DeptCode_txt.Text = string.Empty; DeptName_txt.Text = string.Empty; DeptDetails_dgv.DataSource = null; Update_btn.Enabled = Delete_btn.Enabled = false; DeptCode_txt.Select(); }
private void AddRankForm_Load(object sender, EventArgs e) { DeptCode_txt.Select(); if (vo.DepartmentId > 0) { DeptCode_txt.Text = vo.DepartmentCode; DeptName_txt.Text = vo.DepartmentName; } }