Exemplo n.º 1
0
        public ActionResult Add(int id = 0)
        {
            #region Check Rights
            bool hasRights;
            if (id == 0) //Check export rights
            {
                hasRights = AdminHelper.CheckUserAction(ScreenEnum.CarrierRate, ActionEnum.Add);
            }
            else
            {
                hasRights = AdminHelper.CheckUserAction(ScreenEnum.CarrierRate, ActionEnum.Edit);
            }

            if (!hasRights)
            {
                return(RedirectToAction("UnAuthorized", "Home", new { area = "" }));
            }

            #endregion
            CarrierRateVm carrRateVm = CarrierRateHelper.GetCarrierRateInfo(id);
            ViewBag.CarrierList      = ListCommonHelper.GetCarrierList();
            ViewBag.ContainerList    = ListCommonHelper.GetContainerList();
            ViewData["PortList"]     = ListCommonHelper.GetPortsGrouped();
            ViewData["CurrencyList"] = ListCommonHelper.GetCurrencyList();
            return(View(carrRateVm));
        }
Exemplo n.º 2
0
 public ActionResult AdvSearchOperations()
 {
     ViewBag.ShipperList   = ListCommonHelper.GetShipperList();
     ViewBag.ConsigneeList = ListCommonHelper.GetConsigneeList();
     ViewBag.CarrierList   = ListCommonHelper.GetCarrierList();
     ViewData["PortList"]  = ListCommonHelper.GetPortsGrouped();
     return(PartialView("~/Views/Accounting/_AdvSearchOperations.cshtml"));
 }
 public ActionResult Index()
 {
     ViewBag.CarrierList   = ListCommonHelper.GetCarrierList();
     ViewData["PortList"]  = ListCommonHelper.GetPortsGrouped();
     ViewBag.ContainerList = ListCommonHelper.GetContainerList();
     // var carrRateList = CarrierRateHelper.GetCarrierRatesList(true);
     return(View());
 }
Exemplo n.º 4
0
 public ActionResult AdvSearch()
 {
     ViewBag.ContainerList = ListCommonHelper.GetContainerList();
     ViewBag.ShipperList   = ListCommonHelper.GetShipperList();
     ViewBag.ConsigneeList = ListCommonHelper.GetConsigneeList();
     ViewBag.CarrierList   = ListCommonHelper.GetCarrierList();
     ViewData["PortList"]  = ListCommonHelper.GetPortsGrouped();
     return(PartialView("~/Views/Quotation/_AdvSearch.cshtml"));
 }
Exemplo n.º 5
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"));
        }
Exemplo n.º 6
0
        public ActionResult Add(int id = 0, byte orderFrom = 1)
        {
            #region Check Rights
            bool hasRights;
            if (orderFrom == 1) //Check export rights
            {
                if (id == 0)
                {
                    hasRights = AdminHelper.CheckUserAction(ScreenEnum.ExportQuotation, ActionEnum.Add);
                }
                else
                {
                    hasRights = AdminHelper.CheckUserAction(ScreenEnum.ExportQuotation, ActionEnum.Edit);
                }
            }
            else
            {
                if (id == 0)
                {
                    hasRights = AdminHelper.CheckUserAction(ScreenEnum.ImportQuotation, ActionEnum.Add);
                }
                else
                {
                    hasRights = AdminHelper.CheckUserAction(ScreenEnum.ImportQuotation, ActionEnum.Edit);
                }
            }


            if (!hasRights)
            {
                return(RedirectToAction("UnAuthorized", "Home"));
            }
            #endregion

            QuotationVm quotationsVm = QuotationHelper.GetQuotationInfo(id, orderFrom);

            ViewBag.CarrierList      = ListCommonHelper.GetCarrierList("en", 1);
            ViewBag.ShipperList      = ListCommonHelper.GetShipperList();
            ViewBag.ConsigneeList    = ListCommonHelper.GetConsigneeList();
            ViewBag.NotifierList     = ListCommonHelper.GetNotifierList(0);
            ViewBag.IncotermLib      = ListCommonHelper.GetIncotermLibList();
            ViewBag.Containers       = ListCommonHelper.GetContainerList();
            ViewData["PortList"]     = ListCommonHelper.GetPortsGrouped("en", 1);
            ViewData["CurrencyList"] = ListCommonHelper.GetCurrencyList();
            ViewBag.AgentList        = ListCommonHelper.GetAgentList();

            return(View(quotationsVm));
        }
Exemplo n.º 7
0
        /// <summary>
        /// Add export or import MBL operation
        /// </summary>
        /// <param name="orderFrom"> export --- import</param>
        /// <param name="id">operation id to load edit mode view</param>
        /// <param name="quoteId">quotation id in case of processing an exsiting quotation</param>
        /// <returns>the add operation view</returns>
        public ActionResult Add(string orderFrom = "export", int id = 0, int quoteId = 0)
        {
            #region Check Rights
            bool hasRights;
            if (orderFrom.ToLower() == "export") //Check export rights
            {
                if (quoteId != 0)                //process quotation check
                {
                    hasRights = AdminHelper.CheckUserAction(ScreenEnum.ExportQuotation, ActionEnum.ProcessToMBL);
                }
                else
                {
                    if (id == 0)
                    {
                        hasRights = AdminHelper.CheckUserAction(ScreenEnum.ExportMBL, ActionEnum.Add);
                    }
                    else
                    {
                        hasRights = AdminHelper.CheckUserAction(ScreenEnum.ExportMBL, ActionEnum.Edit);
                    }
                }
            }
            else
            {
                if (quoteId != 0) //process quotation check
                {
                    hasRights = AdminHelper.CheckUserAction(ScreenEnum.ImportQuotation, ActionEnum.ProcessToMBL);
                }
                else
                {
                    if (id == 0)
                    {
                        hasRights = AdminHelper.CheckUserAction(ScreenEnum.ImportMBL, ActionEnum.Add);
                    }
                    else
                    {
                        hasRights = AdminHelper.CheckUserAction(ScreenEnum.ImportMBL, ActionEnum.Edit);
                    }
                }
            }

            if (!hasRights)
            {
                return(RedirectToAction("UnAuthorized", "Home"));
            }

            #endregion

            byte orderFromInt = 0;
            if (orderFrom.ToLower() == "export")
            {
                ViewBag.OperationType = "Export";
                orderFromInt          = 1;
            }
            else if (orderFrom.ToLower() == "import")
            {
                ViewBag.OperationType = "Import";
                orderFromInt          = 2;
            }
            else
            {
                //Error Page
            }


            OperationVm operationVm = OperationHelper.GetOperationInfo(id, orderFromInt, quoteId);

            ViewBag.CarrierList      = ListCommonHelper.GetCarrierList();
            ViewBag.ShipperList      = ListCommonHelper.GetShipperList();
            ViewBag.ConsigneeList    = ListCommonHelper.GetConsigneeList();
            ViewBag.NotifierList     = ListCommonHelper.GetNotifierList(0);
            ViewBag.IncotermLib      = ListCommonHelper.GetIncotermLibList();
            ViewBag.Containers       = ListCommonHelper.GetContainerList();
            ViewBag.PackageList      = ListCommonHelper.GetPackageTypeList();
            ViewData["PortList"]     = ListCommonHelper.GetPortsGrouped();
            ViewData["CurrencyList"] = ListCommonHelper.GetCurrencyList();
            ViewBag.AgentList        = ListCommonHelper.GetAgentList();

            return(View(operationVm));
        }
Exemplo n.º 8
0
 public ActionResult AdvSearch()
 {
     ViewBag.CarrierList    = ListCommonHelper.GetCarrierList();
     ViewBag.ContractorList = ListCommonHelper.GetContractorList();
     return(PartialView("~/Views/APInvoice/_AdvSearch.cshtml"));
 }