예제 #1
0
        public Common.Item[] GetAllDisplay_Products_Array(WSTypes.WSInt32 categoryID)
        {
            Params.spS_tblProduct_Display param = new Params.spS_tblProduct_Display(true);

            param.SetUpConnection(string.Empty);

            if (categoryID == null || categoryID.UseNull)
            {
                param.Param_Pro_LngCategoryID = SqlInt32.Null;
            }
            else if (!categoryID.UseDefault)
            {
                param.Param_Pro_LngCategoryID = categoryID.Value;
            }


            using (SPs.spS_tblProduct_Display sp = new SPs.spS_tblProduct_Display(true)) {
                System.Collections.ArrayList records = new System.Collections.ArrayList();

                System.Data.SqlClient.SqlDataReader sqlDataReader = null;
                sp.Execute(ref param, out sqlDataReader);

                while (sqlDataReader.Read())
                {
                    records.Add(new Common.Item(sqlDataReader.GetGuid(SPs.spS_tblProduct_Display.Resultset1.Fields.Column_ID1.ColumnIndex), sqlDataReader.GetString(SPs.spS_tblProduct_Display.Resultset1.Fields.Column_Display.ColumnIndex)));
                }

                sqlDataReader.Close();

                if (sp.Connection.State == System.Data.ConnectionState.Open)
                {
                    sp.Connection.Close();
                }

                sp.Dispose();
                param.Dispose();

                return((Common.Item[])records.ToArray(typeof(Common.Item)));
            }
        }
예제 #2
0
        public System.Data.DataSet GetAllDisplay_Products_DataSet(WSTypes.WSInt32 categoryID)
        {
            Params.spS_tblProduct_Display param = new Params.spS_tblProduct_Display(true);

            param.SetUpConnection(string.Empty);

            if (categoryID == null || categoryID.UseNull)
            {
                param.Param_Pro_LngCategoryID = SqlInt32.Null;
            }
            else if (!categoryID.UseDefault)
            {
                param.Param_Pro_LngCategoryID = categoryID.Value;
            }


            using (SPs.spS_tblProduct_Display sp = new SPs.spS_tblProduct_Display(true)) {
                System.Data.DataSet dataSet = null;
                sp.Execute(ref param, ref dataSet);
                param.Dispose();

                return(dataSet);
            }
        }
        public System.Data.DataSet GetAllDisplay_tblOrder_Collection_DataSet(WSTypes.WSInt32 col_Ord_LngCustomerID)
        {
            Params.spS_tblOrder_Display param = new Params.spS_tblOrder_Display(true);

            param.SetUpConnection(string.Empty);

            if (col_Ord_LngCustomerID == null || col_Ord_LngCustomerID.UseNull)
            {
                param.Param_Ord_LngCustomerID = SqlInt32.Null;
            }
            else if (!col_Ord_LngCustomerID.UseDefault)
            {
                param.Param_Ord_LngCustomerID = col_Ord_LngCustomerID.Value;
            }


            using (SPs.spS_tblOrder_Display sp = new SPs.spS_tblOrder_Display(true)) {
                System.Data.DataSet dataSet = null;
                sp.Execute(ref param, ref dataSet);
                param.Dispose();

                return(dataSet);
            }
        }