//Making AllItems true for all items is logical. //However, in the SP, we need to pass in a 0 for all items. public DataTable ReadStoreDataClean(DateTime sd, DateTime ed, int clientId = 0, int itemId = 0, StoreDataCleanOption option = StoreDataCleanOption.AllItems) { using (var cmd = Connection.CreateCommand("dbo.StoreDataClean_Select")) using (var adap = new SqlDataAdapter(cmd)) { cmd.Parameters.AddWithValue("Action", "ByClient"); cmd.Parameters.AddWithValue("sDate", sd); cmd.Parameters.AddWithValue("eDate", ed); cmd.Parameters.AddWithValue("AllItems", (int)option); AddParameterIf(cmd, "ClientID", clientId > 0, clientId); AddParameterIf(cmd, "ItemID", itemId > 0, itemId); var dt = new DataTable(); adap.Fill(dt); return(dt); } }
public DataTable ReadStoreDataClean(DateTime sd, DateTime ed, int clientId = 0, int itemId = 0, StoreDataCleanOption option = StoreDataCleanOption.AllItems) { using (var conn = NewConnection()) { conn.Open(); var result = GetReader(conn).ReadStoreDataClean(sd, ed, clientId, itemId, option); conn.Close(); return(result); } }
public DataTable ReadStoreDataClean(DateTime sd, DateTime ed, int clientId = 0, int itemId = 0, StoreDataCleanOption option = StoreDataCleanOption.AllItems) { throw new NotImplementedException(); }