public static string TermiateDelegation(string deptId) { ManageAuthorityDelegationController manageAuthorityDelegationController = new ManageAuthorityDelegationController(); manageAuthorityDelegationController.TermiateEmployee(deptId); return(deptId); }
protected void btn_terminate_Click(object sender, EventArgs e) { delegateController.TermiateEmployee(user.DepartmentId); grv_delegate.DataSource = null; grv_delegate.DataBind(); SendMailToTeminateAuthority(); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "alertMessage", "alert('Termination authority mail has been sent successfully!');", true); btnDeletegate.Enabled = true; btnDeletegate.Text = "Delegate"; btnDeletegate.CssClass = "btn btn-primary"; }
public void CheckDelegatePerson() { LogicUniversityDataModel.Delegate checkAuthority = authorityDelegationController.CheckStatus(user.DepartmentId); if (checkAuthority != null) { if (checkAuthority.EndDate.Value.Date < (DateTime.Now.Date)) { authorityDelegationController.TermiateEmployee(user.DepartmentId); } } }