public ActionResult Delete(int id) { #region Check Rights bool hasRights = false; hasRights = AdminHelper.CheckUserAction(ScreenEnum.Contractor, ActionEnum.Delete); if (!hasRights) { return(Json("You are UnAuthorized to do this action")); } #endregion string isDeleted = ContractorHelper.Delete(id); return(Json(isDeleted)); }
public ActionResult ManageOrder(int id = 0) { var truckingOrderDetailVm = TruckingHelper.GetTruckingOrderDetailInfo(id); ViewBag.TruckingCostNameList = ListCommonHelper.GetTruckingCostNameList(); ViewBag.CurrencyList = ListCommonHelper.GetCurrencyList(); ViewBag.ContractorList = ListCommonHelper.GetContractorListByCity("en", truckingOrderDetailVm.FromCityId, truckingOrderDetailVm.ToCityId); ViewBag.PackageList = ListCommonHelper.GetPackageTypeList(); if (truckingOrderDetailVm.ContractorId != 0) { ViewBag.Contractorobj = ContractorHelper.GetContractorInfo(truckingOrderDetailVm.ContractorId).ContractorNameEn; } return(View(truckingOrderDetailVm)); }
public ActionResult Add(int id = 0) { #region Check Rights bool hasRights; if (id == 0) //Check export rights { hasRights = AdminHelper.CheckUserAction(ScreenEnum.Contractor, ActionEnum.Add); } else { hasRights = AdminHelper.CheckUserAction(ScreenEnum.Contractor, ActionEnum.Edit); } if (!hasRights) { return(RedirectToAction("UnAuthorized", "Home", new { area = "" })); } #endregion ViewData["CityList"] = ListCommonHelper.GetCityGrouped(); ContractorVm contractorObj = ContractorHelper.GetContractorInfo(id); return(View(contractorObj)); }
public ActionResult GetContractorContacts(int contractorId) { var contactList = ContractorHelper.GetContactsList(contractorId); return(PartialView("~/Views/Shared/_ViewContacts.cshtml", contactList)); }
public ActionResult AddEditContractor(ContractorVm contractorVm) { string isSaved = ContractorHelper.AddEditContractor(contractorVm); return(Json(isSaved)); }
public ActionResult Index() { List <ContractorVm> contractorList = ContractorHelper.GetContractorList(); return(View(contractorList)); }