/// <summary> /// Query /// </summary> void Query() { string beginDate = this.dteStart.Text.Trim(); string endDate = this.dteEnd.Text.Trim(); List <EntityParm> dicParm = new List <EntityParm>(); if (beginDate != string.Empty && endDate != string.Empty) { if (Function.Datetime(beginDate + " 00:00:00") > Function.Datetime(endDate + " 00:00:00")) { DialogBox.Msg("开始时间不能大于结束时间。"); return; } dicParm.Add(Function.GetParm("operateDate", beginDate + "|" + endDate)); } if (!string.IsNullOrEmpty(this.cboSSLX.Text)) { dicParm.Add(Function.GetParm("sslx", this.cboSSLX.Text.Trim())); } try { uiHelper.BeginLoading(this); using (ProxyAnaReport proxy = new ProxyAnaReport()) { dateScope = beginDate + " ~ " + endDate; this.gcData.DataSource = proxy.Service.GetOperationRegister(dicParm); } } finally { uiHelper.CloseLoading(this); } }
/// <summary> /// Query /// </summary> void Query() { string beginDate = this.dteStart.Text.Trim(); string endDate = this.dteEnd.Text.Trim(); if (beginDate != string.Empty && endDate != string.Empty) { if (Function.Datetime(beginDate + " 00:00:00") > Function.Datetime(endDate + " 00:00:00")) { DialogBox.Msg("开始时间不能大于结束时间。"); return; } } try { uiHelper.BeginLoading(this); using (ProxyAnaReport proxy = new ProxyAnaReport()) { dateScope = beginDate + " ~ " + endDate; this.gcData.DataSource = proxy.Service.GetYgAdversInpatStat(beginDate, endDate); } } finally { uiHelper.CloseLoading(this); } }
/// <summary> /// /// </summary> /// <param name="beginDate"></param> /// <param name="endDate"></param> /// <returns></returns> public int downYgAlertInfo(string beginDate, string endDate) { int ret = -1; int ret1 = -1; int ret2 = -1; int ret3 = -1; int ret4 = -1; using (ProxyAnaReport proxy = new ProxyAnaReport()) { try { ret = proxy.Service.GetCheckLisInfo(beginDate, endDate); ret1 = proxy.Service.GetOrderAlertInfo(beginDate, endDate); ret2 = proxy.Service.GetVsInfo(beginDate, endDate); ret3 = proxy.Service.GetVsInfo2(beginDate, endDate); ret4 = proxy.Service.GetVsInfo3(beginDate, endDate); } catch (Exception e) { ExceptionLog.OutPutException(e); } if (ret < 0 || ret1 < 0 || ret2 < 0 || ret3 < 0 || ret4 < 0) { return(-1); } else { return(0); } } }
/// <summary> /// Query /// </summary> void Query() { string beginDate = this.dteStart.Text.Trim(); string endDate = this.dteEnd.Text.Trim(); List <EntityParm> dicParm = new List <EntityParm>(); if (beginDate != string.Empty && endDate != string.Empty) { if (Function.Datetime(beginDate + " 00:00:00") > Function.Datetime(endDate + " 00:00:00")) { DialogBox.Msg("开始时间不能大于结束时间。"); return; } dicParm.Add(Function.GetParm("queryDate", beginDate + "|" + endDate)); } if (this.ucDept.DeptVo != null && !string.IsNullOrEmpty(this.ucDept.DeptVo.deptCode)) { dicParm.Add(Function.GetParm("deptCode", this.ucDept.DeptVo.deptCode)); } try { uiHelper.BeginLoading(this); using (ProxyAnaReport proxy = new ProxyAnaReport()) { dateScope = beginDate + " ~ " + endDate; this.gcData.DataSource = proxy.Service.getAlertInfo(dicParm); } } finally { uiHelper.CloseLoading(this); } }
/// <summary> /// Init /// </summary> void Init() { string xmlData = string.Empty; try { uiHelper.BeginLoading(this); this.clbcDoct.Items.Clear(); using (ProxyAnaReport proxy = new ProxyAnaReport()) { xmlData = proxy.Service.GetRegister1Xml(this.AnaId); bool isChecked = (!string.IsNullOrEmpty(xmlData) ? false : true); List <EntityCodeOperator> lstDoct = proxy.Service.GetAnaOperator(); if (lstDoct != null && lstDoct.Count > 0) { foreach (EntityCodeOperator item in lstDoct) { this.clbcDoct.Items.Add(item.operName + " " + item.rankName, isChecked); } } } if (!string.IsNullOrEmpty(xmlData)) { SetXmlData(xmlData); } } finally { uiHelper.CloseLoading(this); } }
/// <summary> /// Stat /// </summary> void Stat() { if (Function.Datetime(this.StartDate) > Function.Datetime(this.EndDate)) { DialogBox.Msg("开始时间不能大于结束时间。"); this.dteStartDate.Focus(); return; } try { uiHelper.BeginLoading(this); using (ProxyAnaReport proxy = new ProxyAnaReport()) { xr.DataSource = proxy.Service.GetAnaStat1(this.StartDate, this.EndDate); XRControl xc; //报表上的组件 xc = xr.FindControl("lblDate", true); if (xc != null) { (xc as XRLabel).Text = " " + this.StartDate + " ~ " + this.EndDate; } xr.CreateDocument(); } } finally { uiHelper.CloseLoading(this); } }
void stat(int rdoFlg) { string beginDate = this.dteDateStart.Text.Trim(); string endDate = this.dteDateEnd.Text.Trim(); Dictionary <string, string> dicParam = new Dictionary <string, string>(); if (beginDate != string.Empty && endDate != string.Empty) { if (Function.Datetime(beginDate + " 00:00:00") > Function.Datetime(endDate + " 00:00:00")) { DialogBox.Msg("开始时间不能大于结束时间。"); return; } dicParam.Add("reportDate", beginDate + "|" + endDate); } if (!string.IsNullOrEmpty(JyStr)) { dicParam.Add("JyStr", JyStr); } try { uiHelper.BeginLoading(this); if (dicParam.Count > 0) { using (ProxyAnaReport proxy = new ProxyAnaReport()) { //List<EntityRptYzb> dataSource = null; if (rdoFlg == 0) { xr.DataSource = proxy.Service.GetMzRptYzb(dicParam, statDept); } else if (rdoFlg == 1) { xr.DataSource = proxy.Service.GetZyRptYzb(dicParam, statDept); } //this.gcData.DataSource = dataSource; XRControl xc; //报表上的组件 xc = xr.FindControl("lblDate", true); if (xc != null) { (xc as XRLabel).Text = " " + beginDate + " ~ " + endDate; } xr.CreateDocument(); } } else { DialogBox.Msg("请输入查询条件。"); } } finally { uiHelper.CloseLoading(this); } }
/// <summary> /// Save /// </summary> void Save() { this.gvData.CloseEditor(); List <EntityAnaStatTemp> data = new List <EntityAnaStatTemp>(); EntityAnaStatTemp vo = null; for (int i = this.gvData.RowCount - 1; i >= 0; i--) { if (this.gvData.GetRowCellValue(i, "Fmonth") != null && !string.IsNullOrEmpty(this.gvData.GetRowCellValue(i, "Fmonth").ToString())) { vo = new EntityAnaStatTemp(); vo.Fmonth = Function.Datetime(this.gvData.GetRowCellValue(i, "Fmonth").ToString()).ToString("yyyy-MM"); vo.Field1 = Function.Int(this.gvData.GetRowCellValue(i, "Field1").ToString()); vo.Field2 = Function.Int(this.gvData.GetRowCellValue(i, "Field2").ToString()); vo.Field3 = Function.Int(this.gvData.GetRowCellValue(i, "Field3").ToString()); vo.Field4 = Function.Int(this.gvData.GetRowCellValue(i, "Field4").ToString()); if (data.Any(t => t.Fmonth == vo.Fmonth)) { DialogBox.Msg("月份存在相同,请检查。"); return; } data.Add(vo); } else { this.gvData.DeleteRow(i); } } if (DialogBox.Msg("确认保存?", MessageBoxIcon.Question) == DialogResult.Yes) { try { using (ProxyAnaReport proxy = new ProxyAnaReport()) { if (proxy.Service.SaveAnaStatTemp(data) > 0) { DialogBox.Msg("保存成功!"); } else { DialogBox.Msg("保存失败。"); } } } catch (Exception ex) { DialogBox.Msg(ex.Message); } } }
/// <summary> /// Init /// </summary> void Init() { this.gvDataBindingSource = new BindingSource(); this.gcData.DataSource = this.gvDataBindingSource; try { uiHelper.BeginLoading(this); using (ProxyAnaReport proxy = new ProxyAnaReport()) { this.gvDataBindingSource.DataSource = proxy.Service.GetAnaStatTemp(); } } finally { uiHelper.CloseLoading(this); } }
/// <summary> /// Query /// </summary> internal void Query() { List <EntityParm> dicParm = new List <EntityParm>(); string beginDate = this.dteStart.Text.Trim(); string endDate = this.dteEnd.Text.Trim(); if (beginDate != string.Empty && endDate != string.Empty) { if (Function.Datetime(beginDate + " 00:00:00") > Function.Datetime(endDate + " 00:00:00")) { DialogBox.Msg("开始时间不能大于结束时间。"); return; } dicParm.Add(Function.GetParm("reportDate", beginDate + "|" + endDate)); } if (deptList != null && !string.IsNullOrEmpty(this.cboDept.Text)) { EntityDeptList vo = deptList.Find(t => t.deptName.Equals(this.cboDept.Text)); if (vo != null) { dicParm.Add(Function.GetParm("deptCode", vo.deptCode)); } } try { uiHelper.BeginLoading(this); if (dicParm.Count > 0) { using (ProxyAnaReport proxy = new ProxyAnaReport()) { List <EntityRiskAna> dataSource = proxy.Service.getRiskAnaStat(dicParm); this.gcData.DataSource = dataSource; } } else { DialogBox.Msg("请输入查询条件。"); } } finally { uiHelper.CloseLoading(this); } }
private void blbiDel_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (DialogBox.Msg("确定是否删除当前记录??", MessageBoxIcon.Question) == DialogResult.Yes) { using (ProxyAnaReport proxy = new ProxyAnaReport()) { if (proxy.Service.Register2Edit(this.AnaId, null) > 0) { this.IsSave = true; this.SetXmlData(string.Empty); DialogBox.Msg("删除记录成功!"); } else { DialogBox.Msg("删除记录失败。"); } } } }
/// <summary> /// init /// </summary> void init() { string[] arrStr = null; string strTmp = string.Empty; DateTime dtmNow = DateTime.Now; this.dteDateStart.DateTime = new DateTime(dtmNow.Year, dtmNow.Month, 1); this.dteDateEnd.DateTime = dtmNow; using (ProxyAnaReport proxy = new ProxyAnaReport()) { strTmp = proxy.Service.GetSysParamStr("3069"); if (!string.IsNullOrEmpty(strTmp)) { arrStr = strTmp.Split('*'); foreach (string str in arrStr) { JyStr += "'" + str + "'" + ","; } JyStr = "(" + JyStr.TrimEnd(',') + ")"; } } decimal printId = 23; EntitySysReport rptVo = null; using (ProxyCommon proxy = new ProxyCommon()) { rptVo = proxy.Service.GetReport(printId); } xr = new XtraReport(); if (rptVo != null) { MemoryStream ms = new MemoryStream(); ms.Write(rptVo.rptFile, 0, rptVo.rptFile.Length); xr.LoadLayout(ms); } this.ucPrintControl.PrintingSystem = xr.PrintingSystem; xr.CreateDocument(); }
private void frmriskanastat_Load(object sender, EventArgs e) { DateTime dtmNow = DateTime.Now; this.dteStart.DateTime = new DateTime(dtmNow.Year, dtmNow.Month, 1); this.dteEnd.DateTime = dtmNow; this.cboDept.Properties.Items.Add(""); using (ProxyAnaReport proxy = new ProxyAnaReport()) { deptList = proxy.Service.getDeptList(); if (deptList != null) { foreach (EntityDeptList vo in deptList) { this.cboDept.Properties.Items.Add(vo.deptName); } } } }
/// <summary> /// Init /// </summary> void Init() { string xmlData = string.Empty; try { uiHelper.BeginLoading(this); using (ProxyAnaReport proxy = new ProxyAnaReport()) { xmlData = proxy.Service.GetRegister2Xml(this.AnaId); } if (!string.IsNullOrEmpty(xmlData)) { SetXmlData(xmlData); } } finally { uiHelper.CloseLoading(this); } }
private void blbiSave_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { try { uiHelper.BeginLoading(this); using (ProxyAnaReport proxy = new ProxyAnaReport()) { if (proxy.Service.Register2Edit(this.AnaId, GetXmlData()) > 0) { this.IsSave = true; DialogBox.Msg("保存成功!"); } else { DialogBox.Msg("保存失败。"); } } } finally { uiHelper.CloseLoading(this); } }