示例#1
0
        public ActionResult ConfigureRatingScales()
        {
            ConfigureRatingScales configratingSale = new ConfigureRatingScales();

            string[] role = Roles.GetRolesForUser(Membership.GetUser().UserName);
            configratingSale.SearchedUserDetails = new SearchedUserDetails();
            CommonMethodsDAL Commondal = new CommonMethodsDAL();

            configratingSale.SearchedUserDetails.UserRole = Commondal.GetMaxRoleForUser(role);
            PersonalDetailsDAL personalDAL = new PersonalDetailsDAL();
            EmployeeDAL        dal         = new EmployeeDAL();
            int employeeID = dal.GetEmployeeID(Membership.GetUser().UserName);

            configratingSale.SearchedUserDetails.EmployeeId   = employeeID;
            configratingSale.SearchedUserDetails.EmployeeCode = personalDAL.getEmployeeCode(employeeID);
            ConfigurationDAL    configDAL   = new ConfigurationDAL();
            List <RatingScales> ratingScale = configDAL.GetRatingScales();

            configratingSale.RecordsCount = ratingScale.Count;
            configratingSale.RatingScale  = ratingScale;
            return(PartialView("_ConfigureRatingScales", configratingSale));
        }