Example #1
0
        public static IBLHeader GetBLHeaderinformation(long BlId)
        {
            string    strExecution = "uspGetBLHeaderInfo";
            IBLHeader header       = null;

            using (DbQuery oDq = new DbQuery(strExecution))
            {
                oDq.AddBigIntegerParam("@BLID", BlId);

                DataTableReader reader = oDq.GetTableReader();

                while (reader.Read())
                {
                    header = new BLHeaderEntity(reader);
                }

                reader.Close();
            }

            return(header);
        }
Example #2
0
        public static List <IBLHeader> GetImportBL(SearchCriteria searchCriteria, int locationId)
        {
            string           strExecution = "[uspGetImportBLList]";
            List <IBLHeader> lstBL        = new List <IBLHeader>();

            using (DbQuery oDq = new DbQuery(strExecution))
            {
                oDq.AddVarcharParam("@IGMBLNo", 100, searchCriteria.IGMBLNo);
                oDq.AddVarcharParam("@LineBLNo", 100, searchCriteria.LineBLNo);
                //oDq.AddVarcharParam("@ContainerNo", 100, searchCriteria.ContainerNo);
                oDq.AddVarcharParam("@POD", 100, searchCriteria.POD);
                oDq.AddVarcharParam("@POL", 100, searchCriteria.POL);
                oDq.AddVarcharParam("@Voyage", 100, searchCriteria.Voyage);
                oDq.AddVarcharParam("@Vessel", 100, searchCriteria.Vessel);
                oDq.AddVarcharParam("@Line", 100, searchCriteria.LineName);
                oDq.AddVarcharParam("@Location", 100, searchCriteria.Location);
                oDq.AddIntegerParam("@Status", searchCriteria.IntegerOption1);

                if (locationId > 0)
                {
                    oDq.AddIntegerParam("@LocationId", locationId);
                }

                oDq.AddVarcharParam("@SortExpression", 100, searchCriteria.SortExpression);
                oDq.AddVarcharParam("@SortDirection", 100, searchCriteria.SortDirection);

                DataTableReader reader = oDq.GetTableReader();

                while (reader.Read())
                {
                    IBLHeader bl = new BLHeaderEntity(reader);
                    lstBL.Add(bl);
                }

                reader.Close();
            }

            return(lstBL);
        }