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)); }
/// <summary> /// The main view to process MBL .. it contains the all tabs /// </summary> /// <param name="orderFrom">export --- import</param> /// <param name="id">Operation Id</param> /// <returns>HouseBill with tabs</returns> public ActionResult HouseBill(string orderFrom, int id) { #region Check Rights bool hasRights; if (orderFrom.ToLower() == "export") //Check export rights { hasRights = AdminHelper.CheckUserAction(ScreenEnum.ExportMBL, ActionEnum.ProcessToHB); } else { hasRights = AdminHelper.CheckUserAction(ScreenEnum.ImportMBL, ActionEnum.ProcessToHB); } if (!hasRights) { return(RedirectToAction("UnAuthorized", "Home")); } #endregion if (orderFrom.ToLower() == "export") { ViewBag.OperationType = "Export"; } else if (orderFrom.ToLower() == "import") { ViewBag.OperationType = "Import"; } else { //Error Page } EasyFreight.Models.OperationView operationView = OperationHelper.GetOne(id); TempData["OperationObj"] = operationView; ViewData["CurrecyList"] = ListCommonHelper.GetCurrencyList(); ViewBag.OperContainers = OperationHelper.GetOperationContainers(id); ViewBag.HBCount = HouseBillHelper.GetHBCount(id); //ViewBag.TruckingCount = TruckingHelper.GetTruckingOrdersCount(id); return(View(operationView)); }
//public ActionResult Dashoard( byte orderFrom =1,string fromDate="", string toDate="") //{ // if (fromDate == "") // fromDate = DateTime.Now.AddDays(-7).ToString("dd/MM/yyyy"); // if (toDate == "") // toDate = DateTime.Now.AddDays(1).ToString("dd/MM/yyyy"); // string isClosed = OperationHelper.CloseOperation(id); // return Json(isClosed); //} public ActionResult GetShippingDeclaration(int id) { EasyFreight.Models.OperationView quoteView = OperationHelper.GetOne(id); ViewData["CurrecyList"] = ListCommonHelper.GetCurrencyList(); ViewBag.QuoteContainers = OperationHelper.GetOperationContainers(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/Operation/_ShippingDecl.cshtml", quoteView)); }