Beispiel #1
0
        public ActionResult StandardRate(StandardSellingRate Model)
        {
            var rtn = new RateSettingsRepository().InsertStandardRate(Model);

            TempData["Success"] = "Added Successfully!";

            return(RedirectToAction("Index"));
        }
Beispiel #2
0
        // GET: RateSettings
        public ActionResult Index()
        {
            //List<RateSettingsItems> items = new RateSettingsRepository().GetWorkDescriptions(1); //load project work description by default
            string   date       = new RateSettingsRepository().GetExpiryDate();
            DateTime expiryDate = Convert.ToDateTime(date.Length == 1 ? DateTime.Today.AddDays(-1).ToString() : date).AddDays(1);

            return(View(new RateSettings
            {
                FromDate = expiryDate,
                ToDate = expiryDate,
                Type = 0
            }));
        }
Beispiel #3
0
 public ActionResult PreviousListPopup()
 {
     try
     {
         var rep  = new RateSettingsRepository();
         var List = rep.GetPreviousList();
         return(View(List));
         //IEnumerable<RateSettings> model = new RateSettingsRepository().GetPreviousList();
         //return View(model);
     }
     catch (Exception ex)
     {
         return(View("Error", new HandleErrorInfo(ex, "RateSettingsController", "PreviousListPopup")));
     }
 }
Beispiel #4
0
        public JsonResult ValidateDate(string date)
        {
            string data = new RateSettingsRepository().ValidateDate(Convert.ToDateTime(date));

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
Beispiel #5
0
        public JsonResult GetSpecialRate(int workDescriptionId, int customerId)
        {
            decimal data = new RateSettingsRepository().GetSpecialRate(workDescriptionId, customerId);

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
Beispiel #6
0
        //[HttpPost]
        //public ActionResult StatusUpdate(SalesQuotation model)
        //  {
        //      int SalesQUotationId = model.SalesQuotationId;
        //      var repo = new SalesQuotationRepository();

        //      var result =repo.StatusUpdate(model);


        //      if (result.SalesQuotationId > 0)
        //      {
        //          TempData["Success"] = "Status Successfully Updated!";
        //          TempData["QuotationRefNo"] = result.QuotationRefNo;
        //          if (model.isProjectBased == 0)
        //          {
        //              return RedirectToAction("Index");
        //          }
        //          else
        //          {
        //              return RedirectToAction("Index");
        //          }
        //      }
        //      else
        //      {
        //          int i = model.SalesQuotationId;
        //          TempData["error"] = "Oops!!..Something Went Wrong!!";
        //          TempData["SaleOrderRefNo"] = null;
        //          return RedirectToAction("StatusUpdate", new { Id = SalesQUotationId });

        //      }


        //  }
        public JsonResult GetRate(int workDescriptionId, string date, int type)
        {
            decimal data = new RateSettingsRepository().GetRate(workDescriptionId, date, type);

            return(Json(data, JsonRequestBehavior.AllowGet));
        }