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 QueryClientInvoiceReport(DateTime?startDate, DateTime?endDate, int?clientID, int?codeID) { DataSet ds = businessProxy.QueryClientInvoiceReport(startDate, endDate, clientID, codeID); ds.Tables[0].Columns.Add(new DataColumn("ClientName")); 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["ClientName"] = SPSClientWrapper.FindById((int)dataRow["ClientId"]).Name; dataRow["MoName"] = SPCodeWrapper.FindById((int)dataRow["CodeID"]).MoCode; dataRow["Price"] = SPCodeWrapper.FindById((int)dataRow["CodeID"]).Price; } ds.AcceptChanges(); return(ds); }