Beispiel #1
0
        public System.Data.DataSet GetAllDisplay_tblOrderItem_Collection_DataSet(WSTypes.WSGuid col_Oit_GuidOrderID, WSTypes.WSGuid col_Oit_GuidProductID)
        {
            Params.spS_tblOrderItem_Display param = new Params.spS_tblOrderItem_Display(true);

            param.SetUpConnection(string.Empty);

            if (col_Oit_GuidOrderID == null || col_Oit_GuidOrderID.UseNull)
            {
                param.Param_Oit_GuidOrderID = SqlGuid.Null;
            }
            else if (!col_Oit_GuidOrderID.UseDefault)
            {
                param.Param_Oit_GuidOrderID = col_Oit_GuidOrderID.Value;
            }

            if (col_Oit_GuidProductID == null || col_Oit_GuidProductID.UseNull)
            {
                param.Param_Oit_GuidProductID = SqlGuid.Null;
            }
            else if (!col_Oit_GuidProductID.UseDefault)
            {
                param.Param_Oit_GuidProductID = col_Oit_GuidProductID.Value;
            }


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

                return(dataSet);
            }
        }
Beispiel #2
0
        public Common.Item[] GetAllDisplay_tblOrderItem_Collection_Array(WSTypes.WSGuid col_Oit_GuidOrderID, WSTypes.WSGuid col_Oit_GuidProductID)
        {
            Params.spS_tblOrderItem_Display param = new Params.spS_tblOrderItem_Display(true);

            param.SetUpConnection(string.Empty);

            if (col_Oit_GuidOrderID == null || col_Oit_GuidOrderID.UseNull)
            {
                param.Param_Oit_GuidOrderID = SqlGuid.Null;
            }
            else if (!col_Oit_GuidOrderID.UseDefault)
            {
                param.Param_Oit_GuidOrderID = col_Oit_GuidOrderID.Value;
            }

            if (col_Oit_GuidProductID == null || col_Oit_GuidProductID.UseNull)
            {
                param.Param_Oit_GuidProductID = SqlGuid.Null;
            }
            else if (!col_Oit_GuidProductID.UseDefault)
            {
                param.Param_Oit_GuidProductID = col_Oit_GuidProductID.Value;
            }


            using (SPs.spS_tblOrderItem_Display sp = new SPs.spS_tblOrderItem_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_tblOrderItem_Display.Resultset1.Fields.Column_ID1.ColumnIndex), sqlDataReader.GetString(SPs.spS_tblOrderItem_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)));
            }
        }