コード例 #1
0
        public ActionResult Index()
        {
            ViewData["CityList"] = ListCommonHelper.GetCityGrouped();
            CompanySetupVm compSetVm = CompanySetupHelper.GetCompanySetup();

            return(View(compSetVm));
        }
コード例 #2
0
ファイル: HomeController.cs プロジェクト: amorsi/EasyFreight
        public ActionResult GetPrintFooter()
        {
            CompanySetupVm compSetVm = new CompanySetupVm();

            if (Session["CompVm"] == null)
            {
                compSetVm         = CompanySetupHelper.GetCompanySetup();
                Session["CompVm"] = compSetVm;
            }
            else
            {
                compSetVm = (CompanySetupVm)Session["CompVm"];
            }

            return(PartialView("~/Views/Shared/_PrintFooter.cshtml", compSetVm));
        }
コード例 #3
0
 public ActionResult GetShippingDeclaration(int id)
 {
     EasyFreight.Models.QuotationView quoteView = QuotationHelper.GetOneQuote(id);
     ViewData["CurrecyList"] = ListCommonHelper.GetCurrencyList();
     ViewBag.QuoteContainers = QuotationHelper.GetQuotationContainers(id);
     ViewData["StaticText"]  = CommonHelper.GetStaticTextById(1);
     Session["quoteId"]      = id;
     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(PartialView("~/Views/Quotation/_ShippingDecl.cshtml", quoteView));
 }
コード例 #4
0
        public ActionResult PrintShippingDeclV(int id)
        {
            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(quoteView));
        }
コード例 #5
0
        public ActionResult SaveTab(CompanySetupVm compSetVm)
        {
            string isSaved = CompanySetupHelper.AddEditCompSetup(compSetVm);

            return(Json(isSaved));
        }