public WCFReturnResult ResetPwd(WCFAuthInfoVM entity_WCFAuthInfoVM, LoginUserVM entity_LUVM) { try { //Restore Server Session WCFReturnResult returnResult = new WCFReturnResult(); WCFSesssionPolicy wcfPolicy = new WCFSesssionPolicy(); BaseSession entity_BaseSession = wcfPolicy.RestoreWCFSesssion(entity_WCFAuthInfoVM); //Contruct Login User Respository CoolPrivilegeControlContext dbContext = CoolPrivilegeControlContext.CreateContext(); LoginUserRespository loginUserRespo = new LoginUserRespository(dbContext, entity_BaseSession.ID); List <string> strList_Error = new List <string>(); var ret = loginUserRespo.ResetPwd(entity_LUVM, languageKey, ref strList_Error); returnResult.IsSuccess = ret; if (strList_Error.Count > 0) { foreach (var item in strList_Error) { returnResult.StrList_Error.Add(item); } } return(returnResult); } catch (Exception ex) { throw new FaultException <WCFErrorContract>(new WCFErrorContract(ex), ex.Message); } }
public int GetTotalAuthorizationCount(WCFAuthInfoVM entity_WCFAuthInfoVM) { try { WCFSesssionPolicy wcfPolicy = new WCFSesssionPolicy(); CoolPrivilegeControlContext dbContext = CoolPrivilegeControlContext.CreateContext(); BaseSession entity_BaseSession = wcfPolicy.RestoreWCFSesssion(entity_WCFAuthInfoVM); AuthorizedHistoryRespository authorizedHistoryRespo = new AuthorizedHistoryRespository(dbContext, entity_BaseSession.ID); int int_Counter = authorizedHistoryRespo.GetTotalAuthorizationCount(OperationType.L); return(int_Counter); } catch (Exception ex) { throw new FaultException <WCFErrorContract>(new WCFErrorContract(ex), ex.Message); } }