public clsControlUsageType() { // // TODO: 在此处添加构造函数逻辑 // clsDomain = new clsDomainControl_ChargeItem(); }
private void m_cmdSub_Click(object sender, System.EventArgs e) { if (m_lsvUse.SelectedItems.Count > 0) { int index = m_lsvUse.SelectedIndices[0]; if (MessageBox.Show("确认删除该项吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button2) == DialogResult.No) { return; } string strId = this.m_lsvUse.SelectedItems[0].SubItems[0].Text.ToString().Trim(); clsDomainControl_ChargeItem objSvc = new clsDomainControl_ChargeItem(); long lngRes = objSvc.m_lngDoUpdUsageorderid_vchrByIDAndTypeId(this.m_intTypeindex, this.m_strUsageID, strId, false); if (lngRes > 0) { m_strOrderIdGroup = strId; m_lsvUse.Items.Remove(m_lsvUse.SelectedItems[0]); if (m_lsvUse.Items.Count > 0) { if (index > 0) { m_lsvUse.Items[index - 1].Selected = true; } else { m_lsvUse.Items[index].Selected = true; } } } } }
/// <summary> /// 查询所属单据 /// </summary> private void m_FillOwnerUsage(string p_strUsageID, int p_intTypeindex) { clsDomainControl_ChargeItem objsvc = new clsDomainControl_ChargeItem(); DataTable dt = new DataTable(); long res = objsvc.m_lngGetData("SELECT * FROM t_opr_setusage t1,t_bse_nurseorder t2 where t1.orderid_vchr=t2.orderid_int(+) and t1.TYPE_INT=" + p_intTypeindex.ToString() + " and t1.USAGEID_CHR='" + p_strUsageID + "'", out dt); if (res > 0) { m_mthBindListViewByDataTable(dt, this.m_lsvUse); } #region bak // string[] strID = p_strOrderIdGroup.Split('|'); // string[] strName = p_strUSAGEOrderName.Split(','); // ListViewItem li = null; // for(int i1=0;i1<strName.Length;i1++) // { // if(strID[i1] != "") // { // li = new ListViewItem(strID[i1]);//单据ID // li.SubItems.Add(strName[i1]); // this.m_lsvUse .Items.Add(li); // } // } // if(m_lsvUse.Items.Count>0) // { // m_lsvUse.HideSelection = false; // m_lsvUse.Items[0].Selected=true; // } #endregion }
/// <summary> /// 删除中药用法带出项目 /// </summary> public void m_mthDel() { if (m_objViewer.m_intOperateState != 1) { return; } clsChargeItemUsageGroup_VO objItem = new clsChargeItemUsageGroup_VO(); objItem = m_objViewer.m_objBridgeForUsaEdit; if (MessageBox.Show("确定删除此项吗?", "提示框!", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) { return; } objItem.m_intFlag = 0; if (MessageBox.Show("是否删除其他同法的此项目?", "提示框!", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { objItem.m_intFlag = 1; } long lngRes = new clsDomainControl_ChargeItem().m_lngDelCMUsageGroupByID(objItem); if (lngRes > 0) { MessageBox.Show(m_objViewer, "操作成功!", "提示框!", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button2); m_objViewer.m_intResultState = 1; m_objViewer.Close(); } else { MessageBox.Show(m_objViewer, "操作失败!", "提示框!", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void m_cmdAdd_Click(object sender, System.EventArgs e) { if (m_lsvAll.SelectedItems.Count > 0) { for (int i1 = 0; i1 < m_lsvUse.Items.Count; i1++) { if (this.m_lsvUse.Items[i1].SubItems[0].Text.ToString().Trim() == this.m_lsvAll.SelectedItems[0].SubItems[0].Text.ToString().Trim()) { MessageBox.Show("该单据已存在!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); m_lsvUse.Focus(); for (int j = 0; j < this.m_lsvUse.Items.Count; j++) { this.m_lsvUse.Items[j].Selected = false; } m_lsvUse.Items[i1].Selected = true; return; } } this.m_strOrderIdGroup = this.m_lsvAll.SelectedItems[0].SubItems[0].Text.ToString().Trim(); clsDomainControl_ChargeItem objSvc = new clsDomainControl_ChargeItem(); long lngRes = objSvc.m_lngDoUpdUsageorderid_vchrByIDAndTypeId(this.m_intTypeindex, this.m_strUsageID, this.m_strOrderIdGroup, true); if (lngRes > 0) { ListViewItem lvw; lvw = new ListViewItem(this.m_lsvAll.SelectedItems[0].SubItems[0].Text.ToString().Trim()); lvw.SubItems.Add(this.m_lsvAll.SelectedItems[0].SubItems[1].Text.ToString().Trim()); lvw.SubItems.Add(this.m_lsvAll.SelectedItems[0].SubItems[2].Text.ToString().Trim()); this.m_lsvUse.Items.Add(lvw); } } }
/// <summary> /// 解释单据名称 /// </summary> /// <param name="p_strorderid"></param> /// <returns></returns> private string m_strJieOrderName(string p_strorderid) { string strResult = ""; if (p_strorderid != "") { string[] str = p_strorderid.Split('|'); clsDomainControl_ChargeItem objsvc = new clsDomainControl_ChargeItem(); DataTable dt = new DataTable(); long res = objsvc.m_lngGetData("SELECT ORDERID_INT,ORDERNAME_VCHR FROM t_bse_nurseorder", out dt); if (res > 0) { for (int i = 0; i < str.Length; ++i) { for (int i2 = 0; i2 < dt.Rows.Count; ++i2) { if (str[i].Trim() == dt.Rows[i2]["ORDERID_INT"].ToString().Trim()) { strResult += dt.Rows[i2]["ORDERNAME_VCHR"].ToString().Trim() + ","; break; } } } } } if (strResult.EndsWith(",")) { strResult = strResult.Substring(0, strResult.Length - 1); } return(strResult); }
public clsControlChargeCat() { // // TODO: 在此处添加构造函数逻辑 // clsDomain = new clsDomainControl_ChargeItem(); }
public frmCasehistoryItemConfig() { // // Windows 窗体设计器支持所必需的 // InitializeComponent(); clsDomain = new clsDomainControl_ChargeItem(); // // TODO: 在 InitializeComponent 调用后添加任何构造函数代码 // }
private DataTable m_mthGetDataFromTypeId(int p_intTypeId) { clsDomainControl_ChargeItem objsvc = new clsDomainControl_ChargeItem(); DataTable dt = new DataTable(); long res = objsvc.m_lngGetData("SELECT * FROM t_opr_setusage t1,t_bse_nurseorder t2 where t1.orderid_vchr=t2.orderid_int(+) and t1.TYPE_INT=" + p_intTypeId.ToString(), out dt); if (res > 0) { return(dt); } else { return(null); } }
private void frmRelationship_Load(object sender, EventArgs e) { if (strITEMID_CHR != "") { clsDomainControl_ChargeItem objsvc = new clsDomainControl_ChargeItem(); DataTable dt = new DataTable(); long res = objsvc.m_lngGetData(@"SELECT a.itemcode_vchr as 项目编码, trim(a.itemname_vchr) as 项目名称, a.itemspec_vchr as 项目规格,a.ITEMUNIT_CHR as 项目单位, a.itemprice_mny as 项目价格 ,a.PDCAREA_VCHR as 产地 FROM t_bse_chargeitem a, t_bse_subchargeitem b WHERE b.ITEMID_CHR = a.itemid_chr AND b.subitemid_chr = '" + strITEMID_CHR + @"' ORDER BY a.itemcode_vchr", out dt); if (res > 0) { dataGridView1.DataSource = dt; } } }
/// <summary> /// 保存中药用法带出项目 /// </summary> /// <param name="p_blnIsAddNew">是否保存新增</param> private bool m_mthblnSave(bool p_blnIsAddNew) { //获取对象 clsBridgeForUsaEdit objItem; GetObjectFromControl(out objItem); //验证对象 if (!CheckObjectForSave(objItem)) { return(false); } //保存 long lngRes = 0; string strRecordID = ""; clsChargeItemUsageGroup_VO objItem1 = new clsChargeItemUsageGroup_VO(); objItem1 = objItem; if (m_objViewer.m_intOperateState != 1) {//新增 lngRes = new clsDomainControl_ChargeItem().m_lngDoAddNewChargeItemCMUsageGroup(out strRecordID, objItem1); } else {//修改 if (objItem1.m_strTOTALPRICE.Trim() != objItem1.m_strItemID.Trim()) { if (MessageBox.Show("是否将把其他用法的相同项目更新为些项目?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { objItem1.m_intFlag = 1; } } lngRes = new clsDomainControl_ChargeItem().m_lngDoModifyChargeItemCMUsageGroup(objItem1); } if (lngRes > 0) { MessageBox.Show(m_objViewer, "操作成功!", "提示框!", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show(m_objViewer, "操作失败!", "提示框!", MessageBoxButtons.OK, MessageBoxIcon.Information); } return((lngRes > 0) ? (true) : (false)); }
public frmCmUsageToItem() { InitializeComponent(); clsDomain = new clsDomainControl_ChargeItem(); }