Ejemplo n.º 1
0
        public ActionResult BHSingleSetupForm()
        {
            BHSingleSetupModel bHSingleSetupModel = new BHSingleSetupModel {
                BranchName      = SelectListItemHelper.GetBranches(),
                AppraisalPeriod = SelectListItemHelper.GetAppraisalPeriod(String.Empty),
                HODeptName      = SelectListItemHelper.GetDepts(String.Empty)
            };

            BHSingleSetupModel bhSingleSetupModel = TempData["bHSingleSetupModel"] as BHSingleSetupModel;

            ViewBag.BranchSelectList         = bHSingleSetupModel.BranchName;
            ViewBag.ApraisalPeriodSelectList = bHSingleSetupModel.AppraisalPeriod;

            if (bhSingleSetupModel == null)
            {
                //return View( bHSingleSetupModel );
            }
            else
            {
                String ErrorMessage = TempData["ErrorMessage"] as String;
                if (ErrorMessage != null)
                {
                    ViewBag.ErrorMessage = ErrorMessage;
                }
                //return View( bhSingleSetupModel );
            }

            return(View(bHSingleSetupModel));
        }
Ejemplo n.º 2
0
        public ActionResult BHBulkSetupForm(int?ActionState)
        {
            SuperBulkSetupModel superBulkSetupModel;

            if (ActionState != null && ActionState == 0)
            {
                BHSingleSetupModel bhs = new BHSingleSetupModel {
                    BranchName      = SelectListItemHelper.GetBranches(),
                    AppraisalPeriod = SelectListItemHelper.GetAppraisalPeriod(String.Empty)
                };
                BHBulkSetupFormModel   bhb = new BHBulkSetupFormModel();
                List <SetupExcelModel> sem = new List <SetupExcelModel>();

                superBulkSetupModel = new SuperBulkSetupModel();
                superBulkSetupModel.BHBulkSetupFormModel = bhb;
                superBulkSetupModel.SetupExcelModel      = sem;
                superBulkSetupModel.BHSingleSetupModel   = bhs;

                return(View(superBulkSetupModel));
            }

            string             periodSelectedValue = (TempData["periodSelectedValue"] != null) ? TempData["periodSelectedValue"].ToString() : String.Empty;
            BHSingleSetupModel bHSingleSetupModel  = new BHSingleSetupModel {
                BranchName      = SelectListItemHelper.GetBranches(),
                AppraisalPeriod = SelectListItemHelper.GetAppraisalPeriod(periodSelectedValue)
            };

            if (TempData["superBulkSetupModel"] != null)
            {
                superBulkSetupModel = TempData["superBulkSetupModel"] as SuperBulkSetupModel;
            }
            else
            {
                if (ViewBag.HasGrid != null)
                {
                    superBulkSetupModel = TempData["superBulkSetupModel"] as SuperBulkSetupModel;
                }
                else
                {
                    BHBulkSetupFormModel   bHBulkSetupFormModel = new BHBulkSetupFormModel();
                    List <SetupExcelModel> setupExcelModel      = new List <SetupExcelModel>();

                    superBulkSetupModel = new SuperBulkSetupModel();
                    superBulkSetupModel.BHBulkSetupFormModel = bHBulkSetupFormModel;
                    superBulkSetupModel.SetupExcelModel      = setupExcelModel;

                    String ErrorMessage = TempData["ErrorMessage"] as String;
                    if (ErrorMessage != null)
                    {
                        ViewBag.ErrorMessage = ErrorMessage;
                    }
                }
            }

            superBulkSetupModel.BHSingleSetupModel = bHSingleSetupModel;
            return(View(superBulkSetupModel));
        }