public static List <SPRecordWrapper> QueryRecord(SPChannelWrapper channel, SPCodeWrapper code, SPSClientWrapper client, string dataType, DateTime?startDate, DateTime?endDate, List <QueryFilter> filters, string orderByColumnName, bool isDesc) { SPChannelEntity channelEntity = null; if (channel != null) { channelEntity = channel.Entity; } SPCodeEntity codeEntity = null; if (code != null) { codeEntity = code.Entity; } SPSClientEntity clientEntity = null; if (client != null) { clientEntity = client.Entity; } return(ConvertToWrapperList(businessProxy.QueryRecord(channelEntity, codeEntity, clientEntity, dataType, startDate, endDate, filters, orderByColumnName, isDesc))); }
public static void SaveRequest(IDataAdapter httpRequestLog, SPChannelWrapper channelID) { try { SPMonitoringRequestWrapper spFailedRequestWrapper = new SPMonitoringRequestWrapper(); if (channelID == null) { spFailedRequestWrapper.ChannelID = null; } else { spFailedRequestWrapper.ChannelID = channelID; } spFailedRequestWrapper.RecievedSendUrl = httpRequestLog.RequestSoucre; spFailedRequestWrapper.RecievedDate = DateTime.Now; spFailedRequestWrapper.RecievedContent = httpRequestLog.RequestData; spFailedRequestWrapper.RecievedIP = httpRequestLog.RequestIp; Save(spFailedRequestWrapper); } catch (Exception e) { Logger.Error("����ʧ������ʧ�ܣ�", e); } }
public static List <SPCodeWrapper> GetAvaiableCodeForClient(SPChannelWrapper spChannelWrapper, SPSClientWrapper spsClientId) { List <SPCodeWrapper> spCodes = FindAllByChannelID(spChannelWrapper); return (spCodes.FindAll( p => (!p.IsDiable && p.MOType != DictionaryConst.Dictionary_CodeType_CodeDefault_Key && ((p.ClientCodeRelation == null) || (p.ClientCodeRelation != null && p.ClientCodeRelation.ClientID.Id != spsClientId.Id))))); }
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); }
public static SPRecordWrapper FindByChannelIDAndLinkID(string linkid, SPChannelWrapper spChannelWrapper) { return(ConvertEntityToWrapper(businessProxy.FindByLinkIDAndChannelID(spChannelWrapper.Entity, linkid))); }
public static List <SPChannelSycnParamsWrapper> FindAllByChannelID(SPChannelWrapper channelID) { return(ConvertToWrapperList(businessProxy.FindAllByChannelID(channelID.Entity))); }
public static List <SPChannelSycnParamsWrapper> FindAllByOrderByAndFilterAndChannelID(string orderByColumnName, bool isDesc, SPChannelWrapper channelID, PageQueryParams pageQueryParams) { return(ConvertToWrapperList(businessProxy.FindAllByOrderByAndFilterAndChannelID(orderByColumnName, isDesc, channelID.Entity, pageQueryParams))); }
public static List <SPMonitoringRequestWrapper> FindAllByChannelID(SPChannelWrapper channelID) { return(ConvertToWrapperList(businessProxy.FindAllByChannelID(channelID.Entity))); }