예제 #1
0
        public ActionResult Edit(int id)
        {
            SetupEmployeeMasterModel     model  = new SetupEmployeeMasterModel();
            SetupEmployeeMasterProviders SEMPro = new SetupEmployeeMasterProviders();

            model = SEMPro.GetList().Where(x => x.EmployeeMasterId == id).FirstOrDefault();
            model.EmployeeEducationInfoList = SEMPro.GetEmployeeEducationInfo().Where(x => x.EmployeeMasterId == id).ToList();
            model.EmployeeTrainingInfoList  = SEMPro.GetEmployeeTrainingInfo().Where(x => x.EmployeeMasterId == id).ToList();
            model.EmployeeMasterId          = id;
            return(View(model));
        }
예제 #2
0
        public ActionResult Index(string searchString, string message)
        {
            string searchWords = searchString;

            if (message != null)
            {
                ViewBag.SaruMessage = message;
            }
            else
            {
                ViewBag.SaruMessage = "";
            }
            SetupEmployeeMasterModel     model  = new SetupEmployeeMasterModel();
            SetupEmployeeMasterProviders SEMPro = new SetupEmployeeMasterProviders();

            model.SetupEmployeeMasterModelList = SEMPro.GetList();
            if (!String.IsNullOrEmpty(searchWords))
            {
                model.SetupEmployeeMasterModelList = SEMPro.GetlistBySearchWord(searchWords);
            }
            return(View(model));
        }