/// <summary> /// 修改保险计划 /// </summary> /// <param name="objResult"></param> /// <returns></returns> public long m_lngModifyINSCOPAY(clsInsPay_VO objResult) { com.digitalwave.iCare.middletier.HIS.clsOPChargeInsSvc objSvc = (com.digitalwave.iCare.middletier.HIS.clsOPChargeInsSvc)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(com.digitalwave.iCare.middletier.HIS.clsOPChargeInsSvc)); long lngRes = objSvc.m_lngModifyINSCOPAY(objPrincipal, objResult); objSvc.Dispose(); return(lngRes); }
public long m_lngGetINSCOPAYataArr(System.Security.Principal.IPrincipal p_objPrincipal, out clsInsPay_VO[] p_objResultArr) { p_objResultArr = new clsInsPay_VO[0]; long lngRes = 0; clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService(); lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.LIS.clsLisDeviceSvc", "m_lngGetINSCOPAYataArr"); if (lngRes < 0) { return(-1); } string strSQL = @"select c.copayid_chr, c.copayname_chr, c.precent_dec, c.usercode_chr, c.remark_vchr, c.planid_chr ,planname_chr from t_aid_inscopay c join t_aid_insplan p on c.planid_chr = p.planid_chr order by copayid_chr"; try { DataTable dtbResult = new DataTable(); com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); lngRes = objHRPSvc.lngGetDataTableWithoutParameters(strSQL, ref dtbResult); objHRPSvc.Dispose(); if (lngRes > 0 && dtbResult.Rows.Count > 0) { p_objResultArr = new clsInsPay_VO[dtbResult.Rows.Count]; for (int i1 = 0; i1 < p_objResultArr.Length; i1++) { p_objResultArr[i1] = new clsInsPay_VO(); p_objResultArr[i1].m_strCOPAYID_CHR = dtbResult.Rows[i1]["COPAYID_CHR"].ToString().Trim(); p_objResultArr[i1].m_strCOPAYNAME_CHR = dtbResult.Rows[i1]["COPAYNAME_CHR"].ToString().Trim(); p_objResultArr[i1].m_dblPRECENT_DEC = Convert.ToDouble(dtbResult.Rows[i1]["PRECENT_DEC"].ToString().Trim()); p_objResultArr[i1].m_strUSERCODE_CHR = dtbResult.Rows[i1]["USERCODE_CHR"].ToString().Trim(); p_objResultArr[i1].m_strREMARK_VCHR = dtbResult.Rows[i1]["REMARK_VCHR"].ToString().Trim(); p_objResultArr[i1].m_strPLANID_CHR = dtbResult.Rows[i1]["PLANID_CHR"].ToString().Trim(); p_objResultArr[i1].m_strPLANNAME_CHR = dtbResult.Rows[i1]["PLANNAME_CHR"].ToString().Trim(); } } } catch (Exception objEx) { string strTmp = objEx.Message; com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public long m_lngModifyINSCOPAY(System.Security.Principal.IPrincipal p_objPrincipal, clsInsPay_VO objResult) { long lngRes = 0; //权限类 clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService(); //检查是否有使用些函数的权限 lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.HIS.clsRegChargeTypeSvc", "m_lngModifyINSCOPAY"); if (lngRes < 0) //没有使用的权限 { return(-1); } string strSQL = "UPDate T_AID_INSCOPAY Set " + "COPAYNAME_CHR='" + objResult.m_strCOPAYNAME_CHR + "' " + ", PRECENT_DEC='" + objResult.m_dblPRECENT_DEC + "' " + ", USERCODE_CHR='" + objResult.m_strUSERCODE_CHR + "' " + ", REMARK_VCHR='" + objResult.m_strREMARK_VCHR + "' " + ", PLANID_CHR='" + objResult.m_strPLANID_CHR + "' " + " Where COPAYID_CHR='" + objResult.m_strCOPAYID_CHR + "' "; try { com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); lngRes = objHRPSvc.DoExcute(strSQL); objHRPSvc.Dispose(); } catch (Exception objEx) { com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public long m_lngAddNewINSCOPAY(System.Security.Principal.IPrincipal p_objPrincipal, clsInsPay_VO p_objRecord, out string p_strRecordID) { long lngRes = 0; p_strRecordID = ""; //权限类 clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService(); //检查是否有使用些函数的权限 lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.HIS.clsRegChargeTypeSvc", "m_lngAddNewINSCOPAY"); if (lngRes < 0) //没有使用的权限 { return(-1); } com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); //返回一最大的计划号 lngRes = objHRPSvc.lngGenerateID(4, "COPAYID_CHR", "T_AID_INSCOPAY", out p_strRecordID); if (lngRes < 0) { return(lngRes); } string strSQL = "INSERT INTO T_AID_INSCOPAY (COPAYID_CHR,COPAYNAME_CHR,PRECENT_DEC,USERCODE_CHR,REMARK_VCHR,PLANID_CHR) VALUES ('" + p_strRecordID + "','" + p_objRecord.m_strCOPAYNAME_CHR + "','" + p_objRecord.m_dblPRECENT_DEC + "','" + p_objRecord.m_strUSERCODE_CHR + "','" + p_objRecord.m_strREMARK_VCHR + "','" + p_objRecord.m_strPLANID_CHR + "')"; string strSQL2 = "insert into t_aid_InsChargeItem (PRECENT_DEC,ITEMID_CHR,COPAYID_CHR) " + " select 100 as PRECENT_DEC, ItemID_chr,'" + p_strRecordID + "' as COPAYID_CHR from t_bse_ChargeItem "; try { lngRes = objHRPSvc.DoExcute(strSQL); lngRes = objHRPSvc.DoExcute(strSQL2); objHRPSvc.Dispose(); } catch (Exception objEx) { string strTmp = objEx.Message; com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
/// <summary> /// 保存保险种类 /// </summary> public void m_mthSaveINSCOPAY() { if (m_objViewer.m_txtCOPAYNAME_CHR_INSCOPAY.Text.Trim() == "") { m_ephHandler.m_mthAddControl(m_objViewer.m_txtCOPAYNAME_CHR_INSCOPAY); m_ephHandler.m_mthShowControlsErrorProvider(); m_ephHandler.m_mthClearControl(); m_objViewer.m_txtCOPAYNAME_CHR_INSCOPAY.Focus(); m_objViewer.m_txtCOPAYNAME_CHR_INSCOPAY.SelectAll(); return; } if (m_objViewer.m_txtPRECENT_DEC_INSCOPAY.Text.Trim() == "" || Convert.ToDouble(m_objViewer.m_txtPRECENT_DEC_INSCOPAY.Text.Trim()) >= 1000000) { m_ephHandler.m_mthAddControl(m_objViewer.m_txtPRECENT_DEC_INSCOPAY); m_ephHandler.m_mthShowControlsErrorProvider(); m_ephHandler.m_mthClearControl(); m_objViewer.m_txtPRECENT_DEC_INSCOPAY.Focus(); m_objViewer.m_txtPRECENT_DEC_INSCOPAY.SelectAll(); return; } if (m_objViewer.m_txtUSERCODE_CHR_INSCOPAY.Text.Trim() == "") { m_ephHandler.m_mthAddControl(m_objViewer.m_txtUSERCODE_CHR_INSCOPAY); m_ephHandler.m_mthShowControlsErrorProvider(); m_ephHandler.m_mthClearControl(); m_objViewer.m_txtUSERCODE_CHR_INSCOPAY.Focus(); m_objViewer.m_txtUSERCODE_CHR_INSCOPAY.SelectAll(); return; } if (m_objViewer.m_txtREMARK_VCHR_INSCOPAY.Text.Trim() == "") { m_ephHandler.m_mthAddControl(m_objViewer.m_txtREMARK_VCHR_INSCOPAY); m_ephHandler.m_mthShowControlsErrorProvider(); m_ephHandler.m_mthClearControl(); m_objViewer.m_txtREMARK_VCHR_INSCOPAY.Focus(); m_objViewer.m_txtREMARK_VCHR_INSCOPAY.SelectAll(); return; } if (m_objViewer.m_cboPLANID_CHR.Text == "" || m_objViewer.m_cboPLANID_CHR.Text == null) { MessageBox.Show("请选择保险计划!", "提示"); m_objViewer.m_cboPLANID_CHR.Focus(); return; } long lngRes = 0; string strID = ""; clsInsPay_VO objResult = new clsInsPay_VO(); objResult.m_strCOPAYNAME_CHR = m_objViewer.m_txtCOPAYNAME_CHR_INSCOPAY.Text.Trim(); objResult.m_dblPRECENT_DEC = Convert.ToDouble(m_objViewer.m_txtPRECENT_DEC_INSCOPAY.Text.Trim()); objResult.m_strUSERCODE_CHR = m_objViewer.m_txtUSERCODE_CHR_INSCOPAY.Text.Trim(); objResult.m_strREMARK_VCHR = m_objViewer.m_txtREMARK_VCHR_INSCOPAY.Text.Trim(); objResult.m_strPLANNAME_CHR = m_objViewer.m_cboPLANID_CHR.Text.Trim(); objResult.m_strPLANID_CHR = m_objViewer.m_lsvINSPLAN.Items[m_objViewer.m_cboPLANID_CHR.SelectedIndex].SubItems[1].Text.Trim(); if (m_objViewer.m_txtCOPAYNAME_CHR_INSCOPAY.Tag == null) //新增 { for (int i = 0; i < m_objViewer.m_lsv_INSCOPAY.Items.Count; i++) { if (m_objViewer.m_lsv_INSCOPAY.Items[i].SubItems[2].Text.Trim() == m_objViewer.m_txtUSERCODE_CHR_INSCOPAY.Text.Trim()) { MessageBox.Show("该助记码已存在!", "提示"); m_ephHandler.m_mthAddControl(m_objViewer.m_txtUSERCODE_CHR_INSCOPAY); m_ephHandler.m_mthShowControlsErrorProvider(); m_ephHandler.m_mthClearControl(); m_objViewer.m_txtUSERCODE_CHR_INSCOPAY.Focus(); m_objViewer.m_txtUSERCODE_CHR_INSCOPAY.SelectAll(); return; } } for (int i = 0; i < m_objViewer.m_lsv_INSCOPAY.Items.Count; i++) { if (m_objViewer.m_lsv_INSCOPAY.Items[i].SubItems[3].Text.Trim() == m_objViewer.m_txtCOPAYNAME_CHR_INSCOPAY.Text.Trim()) { MessageBox.Show("该保险种类已存在!", "提示"); m_ephHandler.m_mthAddControl(m_objViewer.m_txtCOPAYNAME_CHR_INSCOPAY); m_ephHandler.m_mthShowControlsErrorProvider(); m_ephHandler.m_mthClearControl(); m_objViewer.m_txtCOPAYNAME_CHR_INSCOPAY.Focus(); m_objViewer.m_txtCOPAYNAME_CHR_INSCOPAY.SelectAll(); return; } } lngRes = clsDomain.m_lngAddNewINSCOPAY(objResult, out strID); int index = m_objViewer.m_lsv_INSCOPAY.Items.Count; if (lngRes > 0) { ListViewItem lvw = new ListViewItem(); lvw.SubItems.Add(strID); lvw.SubItems.Add(objResult.m_strUSERCODE_CHR); lvw.SubItems.Add(objResult.m_strCOPAYNAME_CHR); lvw.SubItems.Add(objResult.m_dblPRECENT_DEC.ToString()); lvw.SubItems.Add(objResult.m_strREMARK_VCHR); lvw.SubItems.Add(objResult.m_strPLANID_CHR); lvw.SubItems.Add(objResult.m_strPLANNAME_CHR); lvw.Tag = strID; m_objViewer.m_lsv_INSCOPAY.Items.Add(lvw); m_objViewer.m_lsv_INSCOPAY.Items[index].Selected = true; } else { MessageBox.Show("保存失败!", "提示"); } } else { if (m_objViewer.m_lsv_INSCOPAY.SelectedItems.Count <= 0) { return; } for (int i = 0; i < m_objViewer.m_lsv_INSCOPAY.Items.Count; i++) { if (i == m_objViewer.m_lsv_INSCOPAY.SelectedItems[0].Index) { continue; } if (m_objViewer.m_lsv_INSCOPAY.Items[i].SubItems[2].Text.Trim() == m_objViewer.m_txtUSERCODE_CHR_INSCOPAY.Text.Trim()) { MessageBox.Show("该助记码已存在!", "提示"); m_ephHandler.m_mthAddControl(m_objViewer.m_txtUSERCODE_CHR_INSCOPAY); m_ephHandler.m_mthShowControlsErrorProvider(); m_ephHandler.m_mthClearControl(); m_objViewer.m_txtUSERCODE_CHR_INSCOPAY.Focus(); m_objViewer.m_txtUSERCODE_CHR_INSCOPAY.SelectAll(); return; } } for (int i = 0; i < m_objViewer.m_lsv_INSCOPAY.Items.Count; i++) { if (i == m_objViewer.m_lsv_INSCOPAY.SelectedItems[0].Index) { continue; } if (m_objViewer.m_lsv_INSCOPAY.Items[i].SubItems[3].Text.Trim() == m_objViewer.m_txtCOPAYNAME_CHR_INSCOPAY.Text.Trim()) { MessageBox.Show("该保险种类已存在!", "提示"); m_ephHandler.m_mthAddControl(m_objViewer.m_txtCOPAYNAME_CHR_INSCOPAY); m_ephHandler.m_mthShowControlsErrorProvider(); m_ephHandler.m_mthClearControl(); m_objViewer.m_txtCOPAYNAME_CHR_INSCOPAY.Focus(); m_objViewer.m_txtCOPAYNAME_CHR_INSCOPAY.SelectAll(); return; } } objResult.m_strCOPAYID_CHR = m_objViewer.m_txtCOPAYNAME_CHR_INSCOPAY.Tag.ToString(); lngRes = clsDomain.m_lngModifyINSCOPAY(objResult); if (lngRes > 0) { MessageBox.Show("修改成功!", "提示"); m_objViewer.m_lsv_INSCOPAY.SelectedItems[0].SubItems[3].Text = objResult.m_strCOPAYNAME_CHR; m_objViewer.m_lsv_INSCOPAY.SelectedItems[0].SubItems[4].Text = objResult.m_dblPRECENT_DEC.ToString(); m_objViewer.m_lsv_INSCOPAY.SelectedItems[0].SubItems[2].Text = objResult.m_strUSERCODE_CHR; m_objViewer.m_lsv_INSCOPAY.SelectedItems[0].SubItems[5].Text = objResult.m_strREMARK_VCHR; m_objViewer.m_lsv_INSCOPAY.SelectedItems[0].SubItems[6].Text = objResult.m_strPLANID_CHR; m_objViewer.m_lsv_INSCOPAY.SelectedItems[0].SubItems[7].Text = objResult.m_strPLANNAME_CHR; } else { MessageBox.Show("修改失败!", "提示"); } } m_objViewer.m_txtCOPAYNAME_CHR_INSCOPAY.Text = ""; m_objViewer.m_txtPRECENT_DEC_INSCOPAY.Text = ""; m_objViewer.m_txtUSERCODE_CHR_INSCOPAY.Text = ""; m_objViewer.m_txtREMARK_VCHR_INSCOPAY.Text = ""; m_objViewer.m_txtCOPAYNAME_CHR_INSCOPAY.Tag = null; m_objViewer.m_txtCOPAYNAME_CHR_INSCOPAY.Focus(); }