public ActionResult Add(int id = 0) { #region Check Rights bool hasRights; if (id == 0) //Check export rights { hasRights = AdminHelper.CheckUserAction(ScreenEnum.ContractorRate, ActionEnum.Add); } else { hasRights = AdminHelper.CheckUserAction(ScreenEnum.ContractorRate, ActionEnum.Edit); } if (!hasRights) { return(RedirectToAction("UnAuthorized", "Home", new { area = "" })); } #endregion ContractorRateVm carrRateVm = ContractorRateHelper.GetContractorRateInfo(id); ViewBag.ContractorList = ListCommonHelper.GetContractorList(); ViewBag.ContainerList = ListCommonHelper.GetContainerList(); ViewData["AreaList"] = ListCommonHelper.GetAreaGrouped(); ViewData["CityList"] = ListCommonHelper.GetCityGrouped(); ViewData["CurrencyList"] = ListCommonHelper.GetCurrencyList(); return(View(carrRateVm)); }
public ActionResult Delete(int id) { #region Check Rights bool hasRights = false; hasRights = AdminHelper.CheckUserAction(ScreenEnum.ContractorRate, ActionEnum.Delete); if (!hasRights) { return(Json("You are UnAuthorized to do this action")); } #endregion string isDeleted = ContractorRateHelper.Delete(id); return(Json(isDeleted)); }
public ActionResult GetRatesForArea(int fromCityId, int toCityId) { var contractorRateList = ContractorRateHelper.GetContractorRatesForArea(fromCityId, toCityId); return(PartialView("~/Views/ContractorRateInquiry/_ContractorRateSummary.cshtml", contractorRateList)); }
public ActionResult GetSearchResult(FormCollection form) { var contractorRateList = ContractorRateHelper.GetContractorRatesInquiry(form); return(PartialView("~/Views/ContractorRateInquiry/_ResultTable.cshtml", contractorRateList)); }
public JObject GetTableJson(FormCollection form = null) { var contractorRateList = ContractorRateHelper.GetContractorRates(form); return(contractorRateList); }
public ActionResult AddEditContractorRate(ContractorRateVm carrRateVm) { string isSaved = ContractorRateHelper.AddEditContractorRate(carrRateVm); return(Json(isSaved)); }
public ActionResult Index() { var ContractRateList = ContractorRateHelper.GetContractorRatesList(); return(View(ContractRateList)); }