Beispiel #1
0
        /// <summary>
        /// Add and Update view of the Model
        /// </summary>
        /// <returns></returns>
        // [TypeFilter(typeof(AuthorizeAction), Arguments = new object[] { "Write" })]
        public IActionResult Index()
        {
            InvestorCategoryViewModel model = new InvestorCategoryViewModel();

            InitAccessModel(model);
            return(View(model));
        }
Beispiel #2
0
 // [TypeFilter(typeof(AuthorizeAction), Arguments = new object[] { "Write" })]
 public IActionResult AddUpdate(InvestorCategoryViewModel model)
 {
     if (ModelState.IsValid)
     {
         return(Json(_interface.AddUpdate(model.investorCategorys)));
     }
     else
     {
         resp.Message = Constants.ControllerMessage.All_Fields_Mandatory;
         return(Json(resp));
     }
 }
Beispiel #3
0
        /// <summary>
        /// Get the Data based on ID and return to the model to update view.
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
        // [TypeFilter(typeof(AuthorizeAction), Arguments = new object[] { "Write" })]
        public IActionResult Update(int ID)
        {
            InvestorCategoryViewModel model = new InvestorCategoryViewModel();

            model.investorCategorys = _interface.GetData(ID);
            InitAccessModel(model);
            if (model.investorCategorys != null)
            {
                return(View("Index", model));
            }
            else
            {
                return(View("SummaryView", model));
            }
        }