/// <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); } }
public List <EntityDeptList> getDeptList() { string Sql = string.Empty; List <EntityDeptList> data = new List <EntityDeptList>(); SqlHelper svc = null; try { #region Sql svc = new SqlHelper(EnumBiz.onlineDB); Sql = @"select deptid_chr, deptname_vchr, category_int, inpatientoroutpatient_int, operatorid_chr, address_vchr, pycode_chr, attributeid, parentid, createdate_dat, status_int, deactivate_dat, wbcode_chr, code_vchr, extendid_vchr, shortno_chr, stdbed_count_int, putmed_int from t_bse_deptdesc where status_int = 1 and (inpatientoroutpatient_int = 1) order by code_vchr"; #endregion DataTable dt = svc.GetDataTable(Sql); if (dt != null && dt.Rows.Count > 0) { EntityDeptList vo = null; foreach (DataRow dr in dt.Rows) { vo = new EntityDeptList(); vo.deptCode = dr["code_vchr"].ToString(); vo.deptName = dr["deptname_vchr"].ToString(); data.Add(vo); } } } catch (Exception e) { ExceptionLog.OutPutException(e); } finally { svc = null; } return(data); }