/// <summary> /// /// </summary> public clsControlMedStoreWin() { // // TODO: 在此处添加构造函数逻辑 // m_objManage = new clsDomainControlMedStoreBseInfo(); }
private void frmMedprivatewinset_Load(object sender, EventArgs e) { #region 取得所有科室 clsDomainControlMedStoreBseInfo clsDomain = new clsDomainControlMedStoreBseInfo(); DataTable dt = null; long lngRes = clsDomain.m_lngGeDataTableInfo("select DEPTID_CHR,CODE_VCHR, DEPTNAME_VCHR from t_bse_deptdesc order by CODE_VCHR ", out dt); if (lngRes > 0) { if (dt != null) { ListViewItem li = null; for (int i = 0; i < dt.Rows.Count; i++) { li = new ListViewItem(dt.Rows[i]["DEPTID_CHR"].ToString().Trim()); li.SubItems.Add(dt.Rows[i]["CODE_VCHR"].ToString().Trim()); li.SubItems.Add(dt.Rows[i]["DEPTNAME_VCHR"].ToString().Trim()); lvDepts.Items.Add(li); } if (lvDepts.Items.Count > 0) { lvDepts.Items[0].Selected = true; } } } else { MessageBox.Show("数据访问出错,请联系系统管理员."); } #endregion #region 取得药房窗口 clsOPMedStoreWin_VO[] objVO = null; lngRes = clsDomain.m_lngGetMedStoreWinByAny(" AND a.winproperty_int = 1 ORDER BY a.medstoreid_chr ", out objVO); if (lngRes > 0) { if (objVO != null) { ListViewItem li = null; for (int i = 0; i < objVO.Length; i++) { li = new ListViewItem(objVO[i].m_objMedStore.m_strMedStoreName.Trim()); li.SubItems.Add(objVO[i].m_strWindowName.Trim()); li.Tag = objVO[i]; lvwin.Items.Add(li); } if (lvwin.Items.Count > 0) { lvwin.Items[0].Selected = true; } } clsDomain = null; } else { MessageBox.Show("数据访问出错,请联系系统管理员."); } #endregion }
private void AddNewMethod() { #region add clsOPMedStoreWin_VO objVO = null; clsMEDSTOREWINDEPTDEF_VO[] clsVO = null; if (lvwin.Items.Count > 0) { if (lvwin.SelectedItems.Count > 0) { objVO = (clsOPMedStoreWin_VO)lvwin.SelectedItems[0].Tag; if (lvDepts.Items.Count > 0) { if (lvDepts.SelectedItems.Count > 0) { clsVO = new clsMEDSTOREWINDEPTDEF_VO[lvDepts.SelectedItems.Count]; clsDomainControlMedStoreBseInfo clsDomain = new clsDomainControlMedStoreBseInfo(); bool blnExist = false; for (int i = 0; i < lvDepts.SelectedItems.Count; i++) { for (int j = 0; j < lvContaindept.Items.Count; j++) { if (lvContaindept.Items[j].Tag.ToString().Trim() == lvDepts.SelectedItems[i].SubItems[0].Text.Trim()) { blnExist = true; MessageBox.Show(lvDepts.SelectedItems[i].SubItems[2].Text + "已存在", "错误", MessageBoxButtons.OK, MessageBoxIcon.Stop); lvContaindept.Items[j].Selected = true; } } if (blnExist == false) { clsVO[i] = new clsMEDSTOREWINDEPTDEF_VO(); clsVO[i].m_strDEPTID_CHR = lvDepts.SelectedItems[i].SubItems[0].Text; clsVO[i].m_strWINDOWID_CHR = objVO.m_strWindowID; clsVO[i].m_strMEDSTOREID_CHR = objVO.m_objMedStore.m_strMedStoreID; } else { return; } } long lngRes = clsDomain.m_lngInsertMEDSTOREWINDEPT(clsVO); if (lngRes > 0) { GetDataNewMethod(); } else { MessageBox.Show("数据访问出错,请联系系统管理员."); } } } } } #endregion }
private void frmPeriodTotailReport_Load(object sender, EventArgs e) { m_mthGetPeriodList(); clsMedStore_VO[] objItems = new clsMedStore_VO[0]; long lngRes = 0; clsDomainControlMedStoreBseInfo manage = new clsDomainControlMedStoreBseInfo(); lngRes = manage.m_lngGetMedStoreList(out objItems); if (objItems.Length > 0) { for (int i1 = 0; i1 < objItems.Length; i1++) { exComboBox1.Item.Add(objItems[i1].m_strMedStoreName, objItems[i1].m_strMedStoreID); } } this.exComboBox1.SelectedIndex = 1; }
private void DELNewMethod() { #region del clsOPMedStoreWin_VO objVO = null; clsMEDSTOREWINDEPTDEF_VO[] clsVO = null; if (lvwin.Items.Count > 0) { if (lvwin.SelectedItems.Count > 0) { if (DialogResult.Cancel == MessageBox.Show("确认删除?", "确认", MessageBoxButtons.OKCancel, MessageBoxIcon.Question)) { return; } objVO = (clsOPMedStoreWin_VO)lvwin.SelectedItems[0].Tag; if (lvContaindept.Items.Count > 0) { if (lvContaindept.SelectedItems.Count > 0) { clsVO = new clsMEDSTOREWINDEPTDEF_VO[lvContaindept.SelectedItems.Count]; clsDomainControlMedStoreBseInfo clsDomain = new clsDomainControlMedStoreBseInfo(); for (int i = 0; i < lvContaindept.SelectedItems.Count; i++) { clsVO[i] = new clsMEDSTOREWINDEPTDEF_VO(); clsVO[i].m_strDEPTID_CHR = lvContaindept.SelectedItems[i].Tag.ToString().Trim(); clsVO[i].m_strWINDOWID_CHR = objVO.m_strWindowID; clsVO[i].m_strMEDSTOREID_CHR = objVO.m_objMedStore.m_strMedStoreID; } long lngRes = clsDomain.m_lngDeleteMEDSTOREWINDEPT(clsVO); if (lngRes > 0) { GetDataNewMethod(); } else { MessageBox.Show("数据访问出错,请联系系统管理员."); } } } } } #endregion }
private void GetDataNewMethod() { #region 药房专用窗口与科室对应表内容 clsDomainControlMedStoreBseInfo clsDomain = new clsDomainControlMedStoreBseInfo(); clsOPMedStoreWin_VO objVO = null; lvContaindept.Items.Clear(); if (lvwin.Items.Count > 0) { if (lvwin.SelectedItems.Count > 0) { DataTable dt = null; objVO = (clsOPMedStoreWin_VO)lvwin.SelectedItems[0].Tag; long lngRes = clsDomain.m_lngGetMedStoreWinDeptDefInfo(objVO.m_objMedStore.m_strMedStoreID, objVO.m_strWindowID, out dt); if (lngRes > 0) { if (dt != null) { ListViewItem li = null; for (int i = 0; i < dt.Rows.Count; i++) { li = new ListViewItem(dt.Rows[i]["CODE_VCHR"].ToString().Trim()); li.SubItems.Add(dt.Rows[i]["DEPTNAME_VCHR"].ToString().Trim()); li.Tag = dt.Rows[i]["DEPTID_CHR"].ToString().Trim(); lvContaindept.Items.Add(li); } if (lvContaindept.Items.Count > 0) { lvContaindept.Items[0].Selected = true; } } clsDomain = null; } else { MessageBox.Show("数据访问出错,请联系系统管理员."); } } } #endregion }
/// <summary> /// 获得药房 /// </summary> private void m_mthGetMedStore() { long lngRes; clsMedStore_VO[] objMedStorearr = new clsMedStore_VO[0]; clsDomainControlMedStoreBseInfo objManage = new clsDomainControlMedStoreBseInfo(); lngRes = objManage.m_lngGetMedStoreList(out objMedStorearr); if (objMedStorearr.Length > 0) { m_objMedStore = objMedStorearr[0]; m_objViewer.m_txtMedStore.Text = m_objMedStore.m_strMedStoreName.Trim(); m_objViewer.m_txtMedStore.Tag = m_objMedStore; } else { m_objViewer.m_txtMedStore.Text = "获得库房出错"; m_objViewer.m_txtMedStore.Tag = null; } }
/// <summary> /// constructor /// </summary> public frmBigScreen() { InitializeComponent(); this.m_objDomain = new clsDomainControlMedStoreBseInfo(); m_objLEDManager = new com.digitalwave.iCare.LEDManager.LianChen.LEDManager(); }
/// <summary> /// /// </summary> public clsControlMedStoreLimit() { m_objManage = new clsDomainControlMedStoreBseInfo(); }
/// <summary> /// 构造函数 /// </summary> public clscontrollMedStoreLED() { m_objDomain = new clsDomainControlMedStoreBseInfo(); }
/// <summary> /// 构造函数 /// </summary> public clsControllBigScreen() { m_objDomain = new clsDomainControlMedStoreBseInfo(); }
/// <summary> /// 构造函数 /// </summary> public clsControllMedStoreAreaRelation() { m_objDomain = new clsDomainControlMedStoreBseInfo(); }