Exemple #1
0
 public ActionResult GetQuotationDetails(int id)
 {
     EasyFreight.Models.QuotationView quoteView = QuotationHelper.GetOneQuote(id);
     ViewData["CurrecyList"] = ListCommonHelper.GetCurrencyList();
     ViewBag.QuoteContainers = QuotationHelper.GetQuotationContainers(id);
     return(PartialView("~/Views/Quotation/_MoreDetails.cshtml", quoteView));
 }
Exemple #2
0
        public ActionResult Index()
        {
            ViewData["CityList"] = ListCommonHelper.GetCityGrouped();
            CompanySetupVm compSetVm = CompanySetupHelper.GetCompanySetup();

            return(View(compSetVm));
        }
Exemple #3
0
        public ActionResult GetNotifierList(int consigneeId)
        {
            var notifierList = ListCommonHelper.GetNotifierList(consigneeId, "en");

            return(Json(notifierList.Select(x => new { Id = x.Key.ToString(), Value = x.Value })
                        .OrderBy(x => x.Value).ToList()));
        }
        public ActionResult AreaLibrary()
        {
            var areasList = LibraryCommonHelper.GetAreasListByCityId(0);

            ViewData["CityList"] = ListCommonHelper.GetCityGrouped();
            return(View(areasList));
        }
        public ActionResult PortLibrary()
        {
            var portsList = LibraryCommonHelper.GetPortsListByCityId(0);

            ViewData["CityList"] = ListCommonHelper.GetCityGrouped();
            return(View(portsList));
        }
        public ActionResult CityLibrary()
        {
            var citiesList = LibraryCommonHelper.GetCitiesListByCountryId(0);

            ViewData["CountryList"] = ListCommonHelper.GetCountryList();
            return(View(citiesList));
        }
Exemple #7
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));
        }
Exemple #8
0
        /// <summary>
        /// Get Invoice for add new
        /// </summary>
        /// <param name="id">House Bill Id</param>
        /// <param name="oId">Operation Id</param>
        /// <param name="iId">Invoice Id</param>
        /// <param name="iId">Invoice Type 0 all currencies .. 1 EGP .. 2 Other currencies</param>
        /// <returns></returns>
        public ActionResult Invoice(int id = 0, int oId = 0, int iId = 0, byte invType = 0)
        {
            ViewBag.PaymentTerm = ListCommonHelper.GetPaymentTerm("en").Where(x => x.Key < 6).ToList();
            var invObj = InvoiceHelper.GetInvoiceInfo(id, oId, iId, invType);

            return(View(invObj));
        }
        public ActionResult PrintHBDetailsV(int houseBillId = 1033)
        {
            var hbView = HouseBillHelper.GetHBView(houseBillId);
            int id     = hbView.OperationId;

            EasyFreight.Models.OperationView quoteView = OperationHelper.GetOne(id);
            ViewData["CurrecyList"] = ListCommonHelper.GetCurrencyList();
            ViewBag.QuoteContainers = OperationHelper.GetOperationContainers(id);
            ViewData["StaticText"]  = CommonHelper.GetStaticTextById(1);

            //if (quoteView.IsCareOf)
            //{
            //    CompanySetupVm company = CompanySetupHelper.GetCompanySetup();
            //    ViewBag.ShipperAddress = company.CompanyAddressEn;
            //    ViewBag.ShipperTel = (!string.IsNullOrEmpty(company.PhoneNumber1) ? " Tel. " + company.PhoneNumber1 : "") +
            //        (!string.IsNullOrEmpty(company.FaxNumber) ? "  Fax. " + company.FaxNumber : "");
            //}
            //else
            //{
            ViewBag.ShipperAddress = quoteView.ShipperAddressEn;
            ViewBag.ShipperTel     = (!string.IsNullOrEmpty(quoteView.ShipperPhoneNumber) ? " Tel. " + quoteView.ShipperPhoneNumber : "") +
                                     (!string.IsNullOrEmpty(quoteView.ShipperFaxNumber) ? " Fax. " + quoteView.ShipperPhoneNumber : "");
            //}



            return(View(hbView));
        }
Exemple #10
0
        public ActionResult GetVesselList(int carrierId)
        {
            var vesselList = ListCommonHelper.GetVesselLis(carrierId);

            return(Json(vesselList.Select(x => new { Id = x.Key.ToString(), Value = x.Value })
                        .OrderBy(x => x.Value).ToList()));
        }
        public ActionResult Index()
        {
            ViewBag.ContractorList = ListCommonHelper.GetContractorList();
            ViewData["AreaList"]   = ListCommonHelper.GetAreaGrouped();
            ViewBag.ContainerList  = ListCommonHelper.GetContainerList();

            return(View());
        }
Exemple #12
0
        public ActionResult AddInvoice(int hbId, int invId = 0)
        {
            ViewBag.PaymentTerm  = ListCommonHelper.GetPaymentTerm("en").Where(x => x.Key < 6).ToList();
            ViewBag.CurrencyList = ListCommonHelper.GetCurrencyList();
            var invObj = InvoiceHelper.GetInvoiceInfoNew(hbId, invId);

            return(View(invObj));
        }
Exemple #13
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());
 }
Exemple #15
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"));
 }
 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"));
 }
        public ActionResult Index()
        {
            ViewBag.LibItems = ListCommonHelper.GetAgentList();
            //var openBalVm = AccountingHelper.GetOpenBalanceInfo("Agent", 0, "AgentId");
            ViewBag.TbName = "Agent";
            ViewBag.PkName = "AgentId";

            return(View());
        }
        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"));
        }
Exemple #19
0
        public ActionResult ManageOrder(int id)
        {
            ViewBag.customClearObj = CustomClearanceHelper.GetOneCustClearView(id);
            CustomClearanceDetailMainVm custClearDetMain = CustomClearanceHelper.GetCustClearDetailList(id);

            ViewBag.CurrencyList   = ListCommonHelper.GetCurrencyList();
            ViewBag.CCCostNameList = ListCommonHelper.GetCustClearCostList();
            ViewBag.ccId           = id;
            return(View(custClearDetMain));
        }
        public ActionResult GetHBCost(int houseBillId, int operationId)
        {
            ViewBag.OperationCostNameList = ListCommonHelper.GetOperationCostList();
            ViewBag.CurrencyList          = ListCommonHelper.GetCurrencyList();
            ViewBag.HbObj       = ((List <HouseBillListVm>)TempData["hbList"]).Where(x => x.HouseBillId == houseBillId).FirstOrDefault();
            Session["hbOneObj"] = ((List <HouseBillListVm>)TempData["hbList"]).Where(x => x.HouseBillId == houseBillId).FirstOrDefault();
            OperationCostMainVm hbCostAdd = HouseBillHelper.GetHBCost(houseBillId, operationId);

            return(PartialView("~/Views/Operation/_OperationCost.cshtml", hbCostAdd));
        }
Exemple #21
0
        public ActionResult AddOperationCost(int hbId)
        {
            ViewBag.OperationCostNameList = ListCommonHelper.GetOperationCostList();
            ViewBag.CurrencyList          = ListCommonHelper.GetCurrencyList();

            ViewBag.HbObj = HouseBillHelper.GetHbContent(hbId);
            // Session["hbOneObj"] = ((List<HouseBillListVm>)TempData["hbList"]).Where(x => x.HouseBillId == hbId).FirstOrDefault();

            OperationCostMainVm hbCostAdd = HouseBillHelper.GetHBCost(hbId);

            return(View(hbCostAdd));
        }
Exemple #22
0
        public ActionResult CashInReceipt(int invId, int agNoteId = 0)
        {
            ViewBag.CashRecTitle = "Cash In Receipt";
            ViewBag.PaymentTerm  = ListCommonHelper.GetPaymentTerm("en", true)
                                   .Where(x => x.Key != 2 && x.Key < 6)
                                   .ToDictionary(x => x.Key, x => x.Value);
            ViewBag.CurrencyList = ListCommonHelper.GetCurrencyList();
            ViewBag.BankList     = ListCommonHelper.GetBankList();
            var cashReceiptObj = CashHelper.GetCashReceiptInfo(invId, agNoteId);

            return(View(cashReceiptObj));
        }
Exemple #23
0
        public ActionResult CCCashDeposit(int operationId, decimal receiptAmount = 0)
        {
            ViewBag.PaymentTerm = ListCommonHelper.GetPaymentTerm("en")
                                  .Where(x => x.Key == 1)
                                  .ToDictionary(x => x.Key, x => x.Value);
            ViewBag.CurrencyList = ListCommonHelper.GetCurrencyList();
            ViewBag.BankList     = ListCommonHelper.GetBankList();
            var cashReceiptObj = CashOutHelper.GetCashReceiptInfo(0, 0, 0, operationId, receiptAmount);

            ViewBag.CashRecTitle = "Custom Clearance Cash Deposit For Operation " + cashReceiptObj.OperationCode;

            return(View("~/Views/CashManagement/CashInReceipt.cshtml", cashReceiptObj));
        }
        public ActionResult Add(int receiptId = 0)
        {
            ViewBag.PaymentTerm = ListCommonHelper.GetPaymentTerm("en")
                                  .Where(x => x.Key == 1)
                                  .ToDictionary(x => x.Key, x => x.Value);
            ViewBag.CurrencyList = ListCommonHelper.GetCurrencyList();
            ViewBag.BankList     = ListCommonHelper.GetBankList();
            var cashOutObj = CashOutExpenseHelper.GetCashReceiptForExpense(receiptId);

            ViewBag.ExpenseNameList = ListCommonHelper.GetExpensesLibraryList();
            ViewBag.ReceiptId       = receiptId;

            return(View(cashOutObj));
        }
        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));
        }
        /// <summary>
        /// Load add container partial view based on operationtype
        /// </summary>
        /// <param name="operationId"></param>
        /// <param name="carrierType"></param>
        /// <returns></returns>
        public ActionResult GetOperationContainers(int operationId, byte carrierType)
        {
            List <OperationContainerVm> operContainerList = OperationHelper.GetOperationContainers(operationId);

            ViewBag.ContainerList = ListCommonHelper.GetContainerList();
            ViewBag.PackageList   = ListCommonHelper.GetPackageTypeList();
            if (carrierType == 1)//sea
            {
                return(PartialView("~/Views/Operation/_AddContainer.cshtml", operContainerList));
            }
            else
            {
                return(PartialView("~/Views/Operation/_AddContainerAir.cshtml", operContainerList));
            }
        }
        /// <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));
        }
Exemple #28
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));
        }
Exemple #29
0
        public ActionResult AddInvoice(int hbId, int operId = 0, int invId = 0, byte invFor = 1)
        {
            ViewBag.PaymentTerm  = ListCommonHelper.GetPaymentTerm("en").Where(x => x.Key < 6).ToList();
            ViewBag.CurrencyList = ListCommonHelper.GetCurrencyList();
            InvoiceVm invObj;

            if (operId == 0)
            {
                invObj = APInvoiceHelper.GetInvoiceInfo(hbId, invId, invFor); // old code .. will not happen
            }
            else
            {
                invObj = APInvoiceHelper.GetInvoiceInfoFullOperation(operId, invId, invFor);
            }
            return(View(invObj));
        }
        /// <summary>
        /// Get operation details for details pop-up
        /// </summary>
        /// <param name="id">Operation Id</param>
        /// <returns></returns>
        public ActionResult GetOperationDetails(int id)
        {
            Models.OperationView operationView = new Models.OperationView();
            if (TempData["OperationObj"] != null)
            {
                operationView = (Models.OperationView)TempData["OperationObj"];
            }
            else
            {
                operationView = OperationHelper.GetOne(id);
            }

            ViewData["CurrecyList"] = ListCommonHelper.GetCurrencyList();
            ViewBag.OperContainers  = OperationHelper.GetOperationContainers(id);
            return(PartialView("~/Views/Operation/_MoreDetails.cshtml", operationView));
        }