Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        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));
        }