private void LoadOffice() { DataTable dto = new DataTable(); OfficeManagementService objServiceOffice1 = new OfficeManagementService(); objServiceOffice1.AuthSoapHdValue = ServiceAuth.ServiceAuthenticationOffice(); dto = objServiceOffice1.FetchAllOffice(Session["LanguageSetting"].ToString()); if (dto != null && dto.Rows.Count > 0) { ddlOffice.DataSource = dto; ddlOffice.DataTextField = "OFFICE_NAME"; ddlOffice.DataValueField = "OFFICE_ID"; ddlOffice.DataBind(); ddlOffice.Items.Insert(0, "CHOOSE OFFICE"); } }
public IHttpActionResult PostChangePasswordUpdate(ChangePasswordModel dto) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } bool result = _ChangePasswordService.SaveMyPassword(dto.CurrentPassword, dto.EMPPassword, dto.Id); if (result) { OfficeManagementService update = new OfficeManagementService(); update.UpdateOfficeManagement(dto.Id, ""); } if (!result) { return(NotFound()); } return(Ok(result)); }
public IHttpActionResult PostResetChangePassword(ChangePasswordModel dto) { Guid uid = dto.UserId ?? Guid.Empty; bool result = _ChangePasswordService.ResetPassword(dto.EMPPassword, dto.EMPUserId); if (result) { Guid custid = _ChangePasswordService.GetCustomerIdByUserId(dto.EMPUserId); if (custid != Guid.Empty) { OfficeManagementService update = new OfficeManagementService(); update.UpdateOfficeManagement(custid, ""); } } if (!result) { return(NotFound()); } return(Ok(result)); }