public CommonReturnType GetFundingandPayoutDashboard(string fund, string flg, string Fromdt, string Todate) { DataSet dtdata = null; CommonReturnType cmd = new CommonReturnType(); try { string xmldata = ""; Sipdashboard obj = Sipdashboard.GetInstance; obj.fund = fund; obj.flg = flg; obj.Fromdt = Fromdt; obj.Todate = Todate; xmldata = BllCommonUtility.SerializeToXml(obj); using (KlocDalServiceClient dalObjecet = new KlocDalServiceClient()) { dtdata = dalObjecet.GetFundingandPayoutDashboard(xmldata, fund); cmd.Status = true; } } catch (Exception ex) { Util.WriteLog(ex.Source, ex.Message, ex.StackTrace); defMsg = "An Error Accoured While Data Processing!"; cmd.Status = false; dtdata = Util.GetErrorcode("1", defMsg); } finally { cmd.JSONData = cmd.Serialize_JsonData(dtdata); cmd.ds = dtdata; } return(cmd); }
public KlocModel.CommonReturnType GetAllFunds(string userid) { IncomingWebRequestContext request = WebOperationContext.Current.IncomingRequest; WebHeaderCollection headers = request.Headers; DataSet dtdata = null; CommonReturnType cmd = new CommonReturnType(); try { string xmldata = ""; NexPurchase obj = new NexPurchase(); obj.UserID = userid; xmldata = BllCommonUtility.SerializeToXml(obj); using (KlocDalServiceClient dalObjecet = new KlocDalServiceClient()) { dtdata = dalObjecet.GetAllFunds(xmldata); cmd.Status = true; } } catch (Exception ex) { Util.WriteLog(ex.Source, ex.Message, ex.StackTrace); defMsg = "An Error Accoured While Data Processing!"; cmd.Status = false; dtdata = Util.GetErrorcode("1", defMsg); } finally { cmd.JSONData = cmd.Serialize_JsonData(dtdata); cmd.ds = dtdata; } return(cmd); }
protected override sealed void DoWork(DoWorkDTO dto) { var list = GetUnitList(dto).ToList(); int index = 0; int count = list.Count(); int count_success = 0; int count_failure = 0; int count_error = 0; ReportState(new ReportStateDTO() { StateDescription = string.Format("共读取到{0}个待处理项,开始处理...", count) }); foreach (T current in list) { index++; UnitHandleResultEnum unitHandleType = UnitHandleResultEnum.Success; try { CommonReturnType result = UnitHandle(current, dto); if (!result.IsSuccess) { unitHandleType = UnitHandleResultEnum.Failure; count_failure++; Log(new LogDTO() { Text = string.Format("{0}:失败:{1}", current.Key, result.Message) }); } else { unitHandleType = UnitHandleResultEnum.Success; count_success++; } } catch (Exception ex) { unitHandleType = UnitHandleResultEnum.Error; count_error++; Log(new LogDTO() { Text = string.Format("{0}:异常:{1}", current.Key, ex.Message) }); } ReportState(new ReportStateDTO() { StateDescription = string.Format("第{0}/{1}个${2}${3}__当前共成功{4}个,失败{5}个,异常{6}个", index, count, current.Key, GetUnitHanleResultStr(unitHandleType), count_success, count_failure, count_error) }); } Log(new LogDTO() { Text = string.Format("共成功{0}个,失败{1}个,异常{2}个", count_success, count_failure, count_error) }); }
public DataSet GetExchangeofflineCA(string fundcode) { DataSet dtdata = new DataSet(); try { CommonReturnType cmd = new CommonReturnType(); KlocDalServiceClient dalObjecet = new KlocDalServiceClient(); dtdata = dalObjecet.GetExchangeofflineCA(fundcode); } catch (Exception ex) { Util.WriteLog(ex.Source, ex.Message, ex.StackTrace); defMsg = "An Error Accoured While Data Processing!"; dtdata = Util.GetErrorcode("1", defMsg); } return(dtdata); }
public DataSet GetDcrDashboardScheduler(string fundcode, string flg) { DataSet dtdata = new DataSet(); try { string xmldata = ""; Sipdashboard obj = Sipdashboard.GetInstance; obj.flg = flg; xmldata = BllCommonUtility.SerializeToXml(obj); CommonReturnType cmd = new CommonReturnType(); KlocDalServiceClient dalObjecet = new KlocDalServiceClient(); dtdata = dalObjecet.GetDcrDashboardScheduler(fundcode, flg, xmldata); } catch (Exception ex) { Util.WriteLog(ex.Source, ex.Message, ex.StackTrace); defMsg = "An Error Accoured While Data Processing!"; dtdata = Util.GetErrorcode("1", defMsg); } return(dtdata); }
public DataSet GetExchageofflineDetails(string fundcode, string flg, string Todate, string FileName) { DataSet dtdata = new DataSet(); try { string xmldata = ""; Sipdashboard obj = Sipdashboard.GetInstance; obj.flg = flg; obj.Todate = Todate; obj.fund = fundcode; xmldata = BllCommonUtility.SerializeToXml(obj); CommonReturnType cmd = new CommonReturnType(); KlocDalServiceClient dalObjecet = new KlocDalServiceClient(); dtdata = dalObjecet.GetExchageofflineDetails(xmldata, fundcode, FileName); } catch (Exception ex) { Util.WriteLog(ex.Source, ex.Message, ex.StackTrace); defMsg = "An Error Accoured While Data Processing!"; dtdata = Util.GetErrorcode("1", defMsg); } return(dtdata); }