コード例 #1
0
        /// <summary>
        /// operation employee add custom clearance order from process operation order
        /// </summary>
        /// <param name="id">Operation Id</param>
        /// <returns>add custom clearance order patial view</returns>
        public ActionResult CustomClearanceOrder(int id, int houseBillId, byte orderFrom)
        {
            #region Check Rights
            bool hasRights;
            if (orderFrom == 1) //Check export rights
            {
                hasRights = AdminHelper.CheckUserAction(ScreenEnum.ExportHB, ActionEnum.AddEditCCOrder);
            }
            else
            {
                hasRights = AdminHelper.CheckUserAction(ScreenEnum.ImportHB, ActionEnum.AddEditCCOrder);
            }

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

            #endregion

            ViewBag.customClearObj = CustomClearanceHelper.GetCustomClearance(id, houseBillId);
            EasyFreight.Models.HouseBillView operationView = HouseBillHelper.GetHBView(houseBillId);
            ViewBag.ContainerSummary = OperationHelper.GetContainersSummary(id);
            return(PartialView("~/Views/CustomClearance/_CustomClearance.cshtml", operationView));
        }
コード例 #2
0
        public ActionResult PrintWorkOrderV(int id, int operationId)
        {
            var ccViewObj = CustomClearanceHelper.GetOneCustClearView(id);

            ViewBag.OrderDetails      = CustomClearanceHelper.GetCCDetailsList(id);
            ViewBag.ContainersSummary = OperationHelper.GetContainersSummary(operationId);
            return(View(ccViewObj));
        }
コード例 #3
0
        public ActionResult GetOrderDetails(int ccId, int operationId)
        {
            Session["CCId"] = ccId;
            var ccViewObj = CustomClearanceHelper.GetOneCustClearView(ccId);

            ViewBag.OrderDetails      = CustomClearanceHelper.GetCCDetailsList(ccId);
            ViewBag.ContainersSummary = OperationHelper.GetContainersSummary(operationId);
            return(PartialView("~/Views/CustomClearance/_MoreDetails.cshtml", ccViewObj));
        }
コード例 #4
0
        public ActionResult AddTruckingOrder(int operationId, byte orderFrom = 1, int houseBillId = 0)
        {
            #region Check Rights
            bool hasRights;
            if (orderFrom == 1) //Check export rights
            {
                hasRights = AdminHelper.CheckUserAction(ScreenEnum.ExportHB, ActionEnum.AddEditTruckingOrder);
            }
            else
            {
                hasRights = AdminHelper.CheckUserAction(ScreenEnum.ImportHB, ActionEnum.AddEditTruckingOrder);
            }

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

            #endregion

            // remember that cannot create more than one tracking order unless status canceled

            TruckingOrderVm trkoVmObj = TruckingHelper.NewTruckingOrderByOperation(operationId, orderFrom, houseBillId);
            if (trkoVmObj.OrderFrom == 1)
            {
                var shipperObj = ShipperHelper.GetShipperInfo(trkoVmObj.ShipperId);
                ViewBag.ClientName        = shipperObj.ShipperNameEn;
                trkoVmObj.ShipFromAddress = shipperObj.ShipperAddressEn;
            }
            else
            {
                var consigneeObj = ConsigneeHelper.GetConsigneeInfo(trkoVmObj.ConsigneeId);
                ViewBag.ClientName        = consigneeObj.ConsigneeNameEn;
                trkoVmObj.ShipFromAddress = consigneeObj.ConsigneeAddressEn;
            }

            ViewData["AreaList"]     = ListCommonHelper.GetAreaGrouped();
            ViewBag.ContainerSummary = OperationHelper.GetContainersSummary(trkoVmObj.OperationId);

            return(PartialView("~/Views/Trucking/AddTruckingOrder.cshtml", trkoVmObj));
        }