public static void AutoMatch(int channelId, int codeId, int clientId, DateTime startDate, DateTime endDate) { SPChannelWrapper channel = SPChannelWrapper.FindById(channelId); SPCodeWrapper code = SPCodeWrapper.FindById(codeId); SPSClientWrapper client = SPSClientWrapper.FindById(clientId); List <SPRecordWrapper> records = SPRecordWrapper.QueryRecord(channel, code, client, SPRecordWrapper.DayReportType_AllUp, startDate, endDate, new List <QueryFilter>(), "", false); foreach (SPRecordWrapper record in records) { record.ReAutoMatch(); } }
public static DataSet QueryChannelInvoiceReport(DateTime?startDate, DateTime?endDate, int?channelId, int?codeID) { DataSet ds = businessProxy.QueryChannelInvoiceReport(startDate, endDate, channelId, codeID); ds.Tables[0].Columns.Add(new DataColumn("ChannelName")); ds.Tables[0].Columns.Add(new DataColumn("MoName")); ds.Tables[0].Columns.Add(new DataColumn("Price", typeof(decimal))); ds.AcceptChanges(); foreach (DataRow dataRow in ds.Tables[0].Rows) { dataRow["ChannelName"] = SPChannelWrapper.FindById((int)dataRow["ChannelID"]).Name; dataRow["MoName"] = SPCodeWrapper.FindById((int)dataRow["CodeID"]).MoCode; dataRow["Price"] = SPCodeWrapper.FindById((int)dataRow["CodeID"]).Price; } ds.AcceptChanges(); return(ds); }