예제 #1
0
        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 Index()
        {
            ViewBag.ContractorList = ListCommonHelper.GetContractorList();
            ViewData["AreaList"]   = ListCommonHelper.GetAreaGrouped();
            ViewBag.ContainerList  = ListCommonHelper.GetContainerList();

            return(View());
        }
예제 #3
0
 public ActionResult AdvSearch()
 {
     ViewBag.ContractorList = ListCommonHelper.GetContractorList();
     ViewBag.ContainerList  = ListCommonHelper.GetContainerList();
     ViewBag.ShipperList    = ListCommonHelper.GetShipperList();
     ViewBag.ConsigneeList  = ListCommonHelper.GetConsigneeList();
     ViewData["AreaList"]   = ListCommonHelper.GetAreaGrouped();
     return(PartialView("~/Views/Trucking/_AdvSearch.cshtml"));
 }
예제 #4
0
        public ActionResult GetOtherTabForm(string tbName)
        {
            switch (tbName)
            {
            case "Shipper":
                ViewBag.TbName   = "Shipper";
                ViewBag.PkName   = "ShipperId";
                ViewBag.LibItems = ListCommonHelper.GetShipperList();
                break;

            case "Consignee":
                ViewBag.TbName   = "Consignee";
                ViewBag.PkName   = "ConsigneeId";
                ViewBag.LibItems = ListCommonHelper.GetConsigneeList();
                break;

            case "Carrier":
                ViewBag.TbName   = "Carrier";
                ViewBag.PkName   = "CarrierId";
                ViewBag.LibItems = ListCommonHelper.GetCarrierList();
                break;

            case "Contractor":
                ViewBag.TbName   = "Contractor";
                ViewBag.PkName   = "ContractorId";
                ViewBag.LibItems = ListCommonHelper.GetContractorList();
                break;

            case "Currency":
                ViewBag.TbName   = "Currency";
                ViewBag.PkName   = "CurrencyId";
                ViewBag.LibItems = ListCommonHelper.GetCurrencyList();
                break;

            case "BankAccount":
                ViewBag.TbName   = "BankAccount";
                ViewBag.PkName   = "BankAccId";
                ViewBag.LibItems = ListCommonHelper.GetBankAccList();
                break;

            case "PartnerAccount":
                ViewBag.TbName   = "AccountingChart";
                ViewBag.PkName   = "AccountId";
                ViewBag.LibItems = ListCommonHelper.GetPartnersList();
                break;

            case "CashDepositTempAccount":
                ViewBag.TbName   = "AccountingChart";
                ViewBag.PkName   = "AccountId";
                ViewBag.LibItems = ListCommonHelper.GetCCDepositList();
                break;
            }


            return(PartialView("~/Areas/MasterData/Views/OpenBalance/_AddBalanceMain.cshtml"));
        }
예제 #5
0
 public ActionResult AdvSearch()
 {
     ViewBag.CarrierList    = ListCommonHelper.GetCarrierList();
     ViewBag.ContractorList = ListCommonHelper.GetContractorList();
     return(PartialView("~/Views/APInvoice/_AdvSearch.cshtml"));
 }