Beispiel #1
0
        public ActionResult PNLMaster(int?group, bool?clear)
        {
            PNLMasterModel model         = GetPNLMasterModel();
            ArrayList      PNLGropuing   = null;
            string         sGroupBy      = string.Empty;
            string         sGroupByOrder = string.Empty;

            if (clear == true)
            {
                ViewBag.ClearGrouping = true;
                PNLGropuing           = GetPNLGrouping();
                PNLGropuing.Clear();
            }
            else if (group != null)
            {
                ViewBag.ClearGrouping = false;
                sGroupBy = SetGroup(group, sGroupBy);
                Session["GroupAdded"] = true;
            }
            if (Session["GroupAdded"] != null)
            {
                Session["GroupAdded"] = null;
                PNLGropuing           = GetPNLGrouping();
                PNLGropuing.Add(sGroupBy);
                ViewBag.GroupBy = PNLGropuing;
            }
            return(PartialView("_PNLMaster", model));
        }
Beispiel #2
0
        private PNLMasterModel GetPNLMasterModel()
        {
            PNLSelection   selection    = (PNLSelection)Session["PNLReportSelection"];
            string         KeyFieldName = "ID";
            PNLMasterModel model        = new PNLMasterModel()
            {
                KeyFieldName = KeyFieldName, Begin = selection.PeriodBegin, End = selection.PeriodEnd, MAWB = selection.MAWB
            };

            model.PNLTransactionItems = GetPNLTransactionalData();
            model.ImportExport        = selection.ImportExport;
            model.MAWB     = selection.MAWB;
            model.AirOcean = selection.AirOcean;
            return(model);
        }
Beispiel #3
0
        public ActionResult PNL()
        {
            CheckAccess();
            PNLMasterModel model          = new PNLMasterModel();
            bool           forwardToPrint = false;
            string         TypeName       = "";

            foreach (string typeName in GridViewExportHelper.ExportTypes.Keys)
            {
                if (Request.Params[typeName] != null)
                {
                    TypeName       = typeName;
                    forwardToPrint = true;
                }
            }
            if (forwardToPrint)
            {
                return(RedirectToAction("ExportTo", new { Operation = "PNL", typeName = TypeName }));
            }
            if (Request["PeriodBegin"] == null || Request["ReSelect"] != null)
            {
                Session["PNLReportData"] = null;
                ViewBag.IsSelected       = false;
                if (Session["RefreshPNL"] == null)
                {
                    RefreshPNL();
                    Session["RefreshPNL"] = true;
                }
            }
            else
            {
                PNLSelection ReportSelection = new PNLSelection();
                CultureInfo  ci = new CultureInfo("en-US");
                ReportSelection.PeriodBegin   = Convert.ToDateTime(Request["PeriodBegin"], ci);
                ReportSelection.PeriodEnd     = Convert.ToDateTime(Request["PeriodEnd"], ci);
                ReportSelection.MAWB          = Convert.ToString(Request["MAWB"]);
                ReportSelection.AirOcean      = Convert.ToString(Request["AirOcean"]);
                ReportSelection.ImportExport  = Convert.ToString(Request["ImportExport"]);
                ReportSelection.MAWB          = Convert.ToString(Request["MAWB"]);
                Session["PNLReportSelection"] = ReportSelection;
                model = GetPNLMasterModel();
                ViewBag.IsSelected = true;
            }
            return(View(model));
        }