private void btnSave_Click(object sender, EventArgs e) { var result = MessageBox.Show("آیا مایل به ویرایش این کاربر هتسید؟", "اطلاع", MessageBoxButtons.YesNo); if (result == DialogResult.Yes) { Business.Employees EmployeesEdit = new Business.Employees(); #region sent EmployeesEdit.ID = this.ID; EmployeesEdit.FirstName = txtName.Text; EmployeesEdit.Lastname = txtLname.Text; EmployeesEdit.Tell = txtTell.Text; EmployeesEdit.Call = txtCall.Text; EmployeesEdit.type = txtType.Text; EmployeesEdit.time = txtTime.Text; EmployeesEdit.Ntiolecode = txtNtionalcode.Text; #endregion EmployeesEdit.update(); MessageBox.Show("ویرایش با موفقیت انجام شد "); UI.Employees.frmEmployeesList list = new frmEmployeesList(); this.Close(); } }
private void مدیریتکارمندانToolStripMenuItem_Click(object sender, EventArgs e) { UI.Employees.frmEmployeesList list = new UI.Employees.frmEmployeesList(); list.ShowDialog(); }