示例#1
0
        public static List <ExportEDIEntity> GetExportEdi(Int64 vesselId, Int64 voyageId, Int32 polId, Int32 locId)
        {
            string strExecution          = "[exp].[rptExportEDI]";
            List <ExportEDIEntity> lstDO = new List <ExportEDIEntity>();

            using (DbQuery oDq = new DbQuery(strExecution))
            {
                oDq.AddBigIntegerParam("@VesselID", vesselId);
                oDq.AddBigIntegerParam("@VoyageID", voyageId);
                oDq.AddBigIntegerParam("@POLID", polId);
                oDq.AddBigIntegerParam("@LocationID", locId);
                oDq.AddBigIntegerParam("@cf", 2);
                DataTableReader reader = oDq.GetTableReader();

                //while (reader.Read())
                //{
                //    //Do nothing
                //}

                //reader.NextResult();

                while (reader.Read())
                {
                    ExportEDIEntity container = new ExportEDIEntity(reader, false);
                    lstDO.Add(container);
                }

                reader.Close();
            }

            return(lstDO);
        }
示例#2
0
        public static List <ExportEDIEntity> GetExportEdiHeader(Int64 vesselId, Int64 voyageId, Int32 polId, Int32 locId)
        {
            string strExecution          = "[exp].[rptExportEDI]";
            List <ExportEDIEntity> lstDO = new List <ExportEDIEntity>();

            using (DbQuery oDq = new DbQuery(strExecution))
            {
                oDq.AddBigIntegerParam("@VesselID", vesselId);
                oDq.AddBigIntegerParam("@VoyageID", voyageId);
                oDq.AddBigIntegerParam("@POLID", polId);
                oDq.AddBigIntegerParam("@LocationID", locId);
                oDq.AddBigIntegerParam("@cf", 1);

                DataTableReader reader = oDq.GetTableReader();

                while (reader.Read())
                {
                    ExportEDIEntity shpbl = new ExportEDIEntity(reader, true);
                    lstDO.Add(shpbl);
                }

                reader.Close();
            }

            return(lstDO);
        }