public static dynamic SelectByNameAndPassword(string LoginName, string Password, string CompanyId, string BranchNo) { int result = 0; List <string> roles = new List <string>(); roles.Add("Admin"); CustomUserAuthorizeController auth = new CustomUserAuthorizeController(); int value = auth.validate(roles); if (value == (int)UserStatusEnum.UserStatus.Authorized) { Hr_Users obj = UsersBL.GetObject().SelectByNameAndPassword(LoginName, Password, CompanyId, BranchNo); if (obj != null && obj.UserId != null) { result = 1; HttpContext.Current.Session["Hr_UserDL"] = obj; } else { result = 0; } } return(result); // return Ok(result); }
public static dynamic CheckUserAuthontication() { CustomUserAuthorizeController auth = new CustomUserAuthorizeController(); int value = auth.validateUserAuhontiacted(); return(value); }
public static dynamic GetRolesByUser(List <string> roles) { //List<string> roles = new List<string>(); //roles.Add("Admin"); CustomUserAuthorizeController auth = new CustomUserAuthorizeController(); int value = auth.validate(roles); return(value); }
public static dynamic GetRolePageByUser(string Company_Id, string Branch_Id, string User_Id, string PageName) { CustomUserAuthorizeController auth = new CustomUserAuthorizeController(); int value = auth.validateUserAuhontiacted(); if (value == (int)UserStatusEnum.UserStatus.Authuntizated) { return(AppUsersMenuPriviledgeBL.GetObject().GetUserPageByUser(Company_Id, Branch_Id, User_Id, PageName)); } else { return(-1); } }