예제 #1
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"));
 }
예제 #2
0
 public ActionResult AdvSearch()
 {
     ViewBag.ContainerList = ListCommonHelper.GetContainerList();
     ViewBag.ShipperList   = ListCommonHelper.GetShipperList();
     ViewBag.ConsigneeList = ListCommonHelper.GetConsigneeList();
     ViewData["PortList"]  = ListCommonHelper.GetPortsGrouped();
     return(PartialView("~/Views/CustomClearance/_AdvSearch.cshtml"));
 }
예제 #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 ArCashDeposit()
        {
            ViewBag.PaymentTerm = ListCommonHelper.GetPaymentTerm("en")
                                  .Where(x => x.Key == 1 || x.Key == 3) //Cash Or bank only
                                  .ToDictionary(x => x.Key, x => x.Value);
            ViewBag.CurrencyList  = ListCommonHelper.GetCurrencyList();
            ViewBag.BankList      = ListCommonHelper.GetBankList();
            ViewBag.ShipperList   = ListCommonHelper.GetShipperList();
            ViewBag.ConsigneeList = ListCommonHelper.GetConsigneeList();

            var cashReceiptObj = CashHelper.GetCashReceiptInfo(0, 0);

            cashReceiptObj.Notes = "Cash Deposit From Client";
            return(View(cashReceiptObj));
        }
예제 #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));
        }
예제 #7
0
        /// <summary>
        /// Get house bill .. in case of no house bills .. will fill its view model from operation data
        /// </summary>
        /// <param name="operationId"> int Operation Id </param>
        /// <param name="oprOrderFrom">byte Order From</param>
        /// <returns></returns>
        public ActionResult GetHbContent(int operationId, byte oprOrderFrom, int hbId = 0)
        {
            #region Check Rights
            bool hasRights;
            if (oprOrderFrom == 1) //Check export rights
            {
                if (hbId == 0)
                {
                    hasRights = AdminHelper.CheckUserAction(ScreenEnum.ExportHB, ActionEnum.Add);
                }
                else
                {
                    hasRights = AdminHelper.CheckUserAction(ScreenEnum.ExportHB, ActionEnum.Edit);
                }
            }
            else
            {
                if (hbId == 0)
                {
                    hasRights = AdminHelper.CheckUserAction(ScreenEnum.ImportHB, ActionEnum.Add);
                }
                else
                {
                    hasRights = AdminHelper.CheckUserAction(ScreenEnum.ImportHB, ActionEnum.Edit);
                }
            }

            if (!hasRights)
            {
                return(PartialView("~/Views/Shared/_UnAuthorized.cshtml"));
            }

            #endregion
            HouseBillVm houseBillVm = HouseBillHelper.GetHbContent(operationId, oprOrderFrom, hbId);
            ViewBag.ShipperList      = ListCommonHelper.GetShipperList();
            ViewBag.ConsigneeList    = ListCommonHelper.GetConsigneeList();
            ViewBag.IncotermLib      = ListCommonHelper.GetIncotermLibList();
            ViewBag.Containers       = ListCommonHelper.GetContainerList();
            ViewBag.PackageList      = ListCommonHelper.GetPackageTypeList();
            ViewData["PortList"]     = ListCommonHelper.GetPortsGrouped();
            ViewData["CurrencyList"] = ListCommonHelper.GetCurrencyList();
            ViewBag.AgentList        = ListCommonHelper.GetAgentList();
            ViewBag.OperationVm      = OperationHelper.GetOperationInfo(operationId);
            ViewBag.OperContainers   = OperationHelper.GetOperationContainers(operationId);
            ViewBag.SelectedHbCon    = HouseBillHelper.GetHousContainerByHouseID(hbId);
            ViewBag.NotifierList     = ListCommonHelper.GetNotifierList(0);
            return(PartialView("~/Views/Operation/_HouseBill.cshtml", houseBillVm));
        }
예제 #8
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));
        }
예제 #9
0
 public ActionResult AdvSearchInv()
 {
     ViewBag.ShipperList   = ListCommonHelper.GetShipperList();
     ViewBag.ConsigneeList = ListCommonHelper.GetConsigneeList();
     return(PartialView("~/Views/Invoice/_AdvSearchInv.cshtml"));
 }