Ejemplo n.º 1
0
        /// <summary>
        /// Index
        /// </summary>
        /// <returns>List View</returns>
        public ActionResult Index()
        {
            if ((!IsInFunctionList(Constant.FunctionID.CustomerList_Admin)) && (!IsInFunctionList(Constant.FunctionID.CustomerList)))
            {
                return(this.RedirectToAction("Index", "ErrorAuthent"));
            }
            var model = new PMS02001ListViewModel();

            // Get Jquery data table state
            if (Session[Constant.SESSION_TRANSITION_DESTINATION].ToString().Contains("/PMS02001/Edit") && Session[Constant.SESSION_IS_BACK] != null)
            {
                var tmpCondition = GetRestoreData() as Condition;

                if (tmpCondition != null)
                {
                    model.Condition = tmpCondition;
                }
            }

            if (Session[Constant.SESSION_IS_BACK] != null)
            {
                Session[Constant.SESSION_IS_BACK] = null;
            }

            return(this.View("List", model));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Customer list
        /// </summary>
        /// <param name="callback">Callback function name</param>
        /// <returns>Customer list</returns>
        public ActionResult Select(string isMultiSelect = "", string callback = "", int projectId = 0)
        {
            var model = new PMS02001ListViewModel {
                IS_MULTI_SELECT = !string.IsNullOrEmpty(isMultiSelect) ? Constant.DEFAULT_VALUE : string.Empty,
                CallBack        = callback,
                SearchByObject  = (callback == "setOutsourcer") ? SearchObject.Customer : SearchObject.EndUser
            };

            model.Condition.PROJECT_ID = projectId;

            return(this.View("Select", model));
        }