public List <LiquidationSummary> GetLiquidationSummaryDetails(int BatchNo) { List <LiquidationSummary> lstLiquidation = new List <LiquidationSummary>(); SqlDataReader reader = null; LiquidationSummary Liquid = null; try { SqlParameter[] parem = new SqlParameter[1]; parem[0] = new SqlParameter("@Batch_No", BatchNo); reader = SqlHelper.ExecuteReader(CommonDataAccess.ExchangeConnectionString, CommandType.StoredProcedure, "rsp_REPORT_SGVI_LiquidationSummary", parem); while (reader.Read()) { Liquid = new LiquidationSummary(); Liquid.Date_Collected = Convert.ToDateTime(reader["Date_Collected"]); Liquid.Retailer_Name = reader["Retailer_Name"].ToString(); Liquid.Gross = Convert.ToDecimal(reader["Gross"]); Liquid.Net = Convert.ToDecimal(reader["Net"]); Liquid.Net_Percentage = Convert.ToDecimal(reader["Net_Percentage"]); Liquid.Percentage_Setting = Convert.ToDecimal(reader["Percentage_Setting"]); Liquid.Retail_Negative_Net = Convert.ToDecimal(reader["Retail_Negative_Net"]); Liquid.Retailer = Convert.ToDecimal(reader["Retailer"]); Liquid.Retailer_Share = Convert.ToDecimal(reader["Retailer_Share"]); Liquid.Tickets_Paid = Convert.ToDecimal(reader["Tickets_Paid"]); Liquid.Tickets_Expected = Convert.ToDecimal(reader["Tickets_Expected"]); Liquid.Advance_To_Retailer = Convert.ToDecimal(reader["Advance_To_Retailer"]); Liquid.Balance_Due = Convert.ToDecimal(reader["Balance_Due"]); lstLiquidation.Add(Liquid); } } catch (Exception ex) { ExceptionManager.Publish(ex); } finally { if (reader != null) { reader.Dispose(); } } return(lstLiquidation); }
public List<LiquidationSummary> GetLiquidationSummaryDetails(int BatchNo) { List<LiquidationSummary> lstLiquidation = new List<LiquidationSummary>(); SqlDataReader reader = null; LiquidationSummary Liquid = null; try { SqlParameter[] parem = new SqlParameter[1]; parem[0] = new SqlParameter("@Batch_No", BatchNo); reader = SqlHelper.ExecuteReader(CommonDataAccess.ExchangeConnectionString, CommandType.StoredProcedure, "rsp_REPORT_SGVI_LiquidationSummary", parem); while (reader.Read()) { Liquid = new LiquidationSummary(); Liquid.Date_Collected = Convert.ToDateTime(reader["Date_Collected"]); Liquid.Retailer_Name = reader["Retailer_Name"].ToString(); Liquid.Gross = Convert.ToDecimal(reader["Gross"]); Liquid.Net = Convert.ToDecimal(reader["Net"]); Liquid.Net_Percentage = Convert.ToDecimal(reader["Net_Percentage"]); Liquid.Percentage_Setting = Convert.ToDecimal(reader["Percentage_Setting"]); Liquid.Retail_Negative_Net = Convert.ToDecimal(reader["Retail_Negative_Net"]); Liquid.Retailer = Convert.ToDecimal(reader["Retailer"]); Liquid.Retailer_Share = Convert.ToDecimal(reader["Retailer_Share"]); Liquid.Tickets_Paid = Convert.ToDecimal(reader["Tickets_Paid"]); Liquid.Tickets_Expected = Convert.ToDecimal(reader["Tickets_Expected"]); Liquid.Advance_To_Retailer = Convert.ToDecimal(reader["Advance_To_Retailer"]); Liquid.Balance_Due = Convert.ToDecimal(reader["Balance_Due"]); lstLiquidation.Add(Liquid); } } catch (Exception ex) { ExceptionManager.Publish(ex); } finally { if (reader != null) reader.Dispose(); } return lstLiquidation; }