예제 #1
0
        public AccountController()


        {
            _AccountService = new CU_AccountService();
            _logService     = new CU_LogService();
        }
예제 #2
0
        public static bool CheckUserCookie(UserProfile profile)
        {
            if (HttpContext.Current.Request.Cookies["UserProfileCookie"] != null)
            {
                string strId = DataProtection.Decrypt(HttpContext.Current.Request.Cookies["UserProfileCookie"]["Id"]);
                if (string.IsNullOrWhiteSpace(strId))
                {
                    return(false);
                }
                UserModel employee = new CU_AccountService().ValidateLoginData(DataProtection.Decrypt(HttpContext.Current.Request.Cookies["UserProfileCookie"]["LoginName"])
                                                                               , DataProtection.Decrypt(HttpContext.Current.Request.Cookies["UserProfileCookie"]["Password"]));
                if (employee != null)
                {
                    CreateUserSession(profile, employee);
                    return(true);
                }
                else
                {
                    return(false);
                }



                return(true);
            }
            else
            {
                return(false);
            }
        }
예제 #3
0
 public EmployeeController()
 //       : base(new CU_Employee_RoleProgramService())      // just in case of changing somr thing in the service but the inserted service must inherit from IManageBaseService<[same model]>
 {
     _CU_EmployeeService             = new CU_EmployeeService();
     _CU_Role_ProgramService         = new CU_Role_ProgramService();
     _CU_Employee_RoleProgramService = new CU_Employee_RoleProgramService();
     _CU_AcountService = new CU_AccountService();
 }