Example #1
0
 public ActionResult Create(QuotationApprovalViewModel model)
 {
     if (ModelState.IsValid)
     {
         QuotationApprovalRepository repo = new QuotationApprovalRepository();
         TempData["Success"] = "Updated Successfully!";
         //TempData["Id"] = 1;
         repo.UpdateSettings(model);
     }
     return(View(model));
 }
Example #2
0
        public ActionResult Create()
        {
            QuotationApprovalRepository repo  = new QuotationApprovalRepository();
            QuotationApprovalViewModel  model = new QuotationApprovalViewModel();

            var amountSettings   = repo.GetApprovalAmountSettings();
            var approvalSettings = repo.GetApprovalSettings();

            model.QuotationApprovalAmountSettings = new List <QuotationApprovalAmountSettings>();
            model.QuotationApprovalSettings       = new List <QuotationApprovalSettings>();

            foreach (var item in amountSettings)
            {
                model.QuotationApprovalAmountSettings.Add(item);
            }
            foreach (var item in approvalSettings)
            {
                model.QuotationApprovalSettings.Add(item);
            }
            return(View(model));
        }