コード例 #1
0
        // [TypeFilter(typeof(AuthorizeAction), Arguments = new object[] { "Read" })]
        public IActionResult SummaryView()
        {
            RTATransactionTypeViewModel model = new RTATransactionTypeViewModel();

            InitAccessModel(model);
            return(View(model));
        }
コード例 #2
0
        // [TypeFilter(typeof(AuthorizeAction), Arguments = new object[] { "Write" })]
        public IActionResult Index()
        {
            RTATransactionTypeViewModel model = new RTATransactionTypeViewModel();

            InitAccessModel(model);
            model.RTAList             = _interface.FillDropDown(Constants.Procedures.GetRTADropDown);
            model.TransactionTypeList = _interface.FillDropDown(Constants.Procedures.GetTransactionTypeDropDown);
            return(View(model));
        }
コード例 #3
0
 public IActionResult Index(RTATransactionTypeViewModel model)
 {
     if (ModelState.IsValid)
     {
         return(Json(_interface.AddUpdate(model.RTATransactionTypes)));
     }
     else
     {
         JsonResponse resp = new JsonResponse
         {
             Message = Constants.ControllerMessage.All_Fields_Mandatory
         };
         return(Json(resp));
     }
 }
コード例 #4
0
        // [TypeFilter(typeof(AuthorizeAction), Arguments = new object[] { "Write" })]
        public IActionResult Update(long ID)
        {
            RTATransactionTypeViewModel model = new RTATransactionTypeViewModel();

            InitAccessModel(model);
            model.RTATransactionTypes = _interface.GetTransactionType(ID);
            if (model.RTATransactionTypes != null)
            {
                model.RTAList             = _interface.FillDropDown(Constants.Procedures.GetRTADropDown);
                model.TransactionTypeList = _interface.FillDropDown(Constants.Procedures.GetTransactionTypeDropDown);
                return(View("Index", model));
            }
            else
            {
                return(View("SummaryView", model));
            }
        }