コード例 #1
0
        public ActionResult ConfigureParameter()
        {
            try
            {
                Session["SearchEmpFullName"] = null;  // to hide emp search
                Session["SearchEmpCode"]     = null;
                Session["SearchEmpID"]       = null;

                ConfirmationViewModel confirmationmodel = new ConfirmationViewModel();
                string   EmployeeCode = Membership.GetUser().UserName;
                string[] role         = Roles.GetRolesForUser(EmployeeCode);
                confirmationmodel.SearchedUserDetails = new SearchedUserDetails();
                CommonMethodsDAL Commondal = new CommonMethodsDAL();
                confirmationmodel.SearchedUserDetails.UserRole = Commondal.GetMaxRoleForUser(role);
                PersonalDetailsDAL personalDAL = new PersonalDetailsDAL();
                confirmationmodel.SearchedUserDetails.EmployeeCode = EmployeeCode;
                EmployeeDAL DAL = new EmployeeDAL();
                confirmationmodel.SearchedUserDetails.EmployeeId = DAL.GetEmployeeID(EmployeeCode);
                ConfigurationDAL        configDAL        = new ConfigurationDAL();
                List <CompetencyMaster> competencyMaster = configDAL.GetCompetencyMaster();
                confirmationmodel.RecordsCount      = competencyMaster.Count;
                confirmationmodel.CompetencyMasters = competencyMaster;
                return(PartialView("_ConfigureParameter", confirmationmodel));
            }
            catch
            {
                throw;
            }
        }