public long m_lngUpdatePEReg(string strApplicationID) { long lngAfterEffect = 0; long lngRes = -1; string strSQL = @"update t_pe_register set regstatus_int = 1 where regstatus_int = 2 and regno_chr = (select ta.patient_inhospitalno_chr from t_opr_lis_application ta where ta.application_id_chr = ? and ta.pstatus_int > 0)"; try { clsHRPTableService objHRPSvc = new clsHRPTableService(); IDataParameter[] Param = null; objHRPSvc.CreateDatabaseParameter(1, out Param); Param[0].Value = strApplicationID; lngRes = objHRPSvc.lngExecuteParameterSQL(strSQL, ref lngAfterEffect, Param); objHRPSvc.Dispose(); } catch (Exception objEx) { string strTmp = objEx.Message; com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public long ModifyBalanceRemark(System.Security.Principal.IPrincipal p_objPrincipal, string p_strBalanceId, string p_strRemark) { long lngRes = 0; clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService(); lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.HIS.clsPrepayCheckoutSvc", "ModifyBalanceRemark"); if (lngRes < 0) { return(-1); } string strSQL = @" UPDATE T_OPR_BIH_PREPAYBALANCE SET REMARK_VCHR = ? WHERE BALANCEID_VCHR = ?"; try { com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); System.Data.IDataParameter[] parameterArr = null; objHRPSvc.CreateDatabaseParameter(2, out parameterArr); parameterArr[0].Value = p_strRemark; parameterArr[1].Value = p_strBalanceId; lngRes = objHRPSvc.lngExecuteParameterSQL(strSQL, ref lngRes, parameterArr); } catch (Exception objEx) { string strTmp = objEx.Message; com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public long m_lngModiffyOpsAppStatus(string p_Recipe, string strOrderid) { long lngRes = -1; string strSQL = string.Empty; long lngEff = -1; strSQL = @"update t_opr_opsapply t set t.status_int = 1 where t.outpatrecipeid_chr = ?"; clsHRPTableService objHRPSvc = null; IDataParameter[] objParamArr = null; try { objHRPSvc = new clsHRPTableService(); objHRPSvc.CreateDatabaseParameter(1, out objParamArr); objParamArr[0].Value = p_Recipe; lngRes = objHRPSvc.lngExecuteParameterSQL(strSQL, ref lngEff, objParamArr); } catch (Exception objEX) { clsLogText objLog = new clsLogText(); objLog.LogError(objEX); } finally { if (objHRPSvc != null) { objHRPSvc.Dispose(); objHRPSvc = null; } } return(lngRes); }
public long m_lngModify(System.Security.Principal.IPrincipal p_objPrincipal, clsHISMedType_VO p_objRecord) { long lngRes = 0; clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService(); lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.HIS.clsHISMedTypeManageSvc", "m_lngModify"); if (lngRes < 0) { return(-1); } string strSQL = @" UPDATE T_BSE_PHARMATYPE SET PHARMANAME_VCHR =?,ASSISTCODE_VCHR =?,PYCODE_VCHR =?,WBCODE_VCHR =? ,PARENTID_CHR = ? WHERE PHARMAID_CHR =?"; try { com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); IDataParameter[] objDPArr = null; objHRPSvc.CreateDatabaseParameter(6, out objDPArr); objDPArr[0].Value = p_objRecord.m_strPHARMANAME_VCHR; objDPArr[1].Value = p_objRecord.m_strASSISTCODE_VCHR; objDPArr[2].Value = p_objRecord.m_strPYCODE_VCHR; objDPArr[3].Value = p_objRecord.m_strWBCODE_VCHR; objDPArr[4].Value = p_objRecord.m_strPARENTID_CHR; objDPArr[5].Value = p_objRecord.m_strPHARMAID_CHR; long l = 0; lngRes = objHRPSvc.lngExecuteParameterSQL(strSQL, ref l, objDPArr); } catch (Exception objEx) { string strTmp = objEx.Message; com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
private long m_lngDeteleRelate(string p_strApplyUnitID) { long lngRes = 0; string strSQL = @"DELETE FROM t_aid_lis_unit_propert_relate WHERE APPLY_UNIT_ID_CHR = ? " ; try { System.Data.IDataParameter[] objDPArr = null; com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); objHRPSvc.CreateDatabaseParameter(1, out objDPArr); objDPArr[0].Value = p_strApplyUnitID; long lngEff = 0; lngRes = objHRPSvc.lngExecuteParameterSQL(strSQL, ref lngEff, objDPArr); } catch (Exception objEx) { com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); //要在LogError方法中抛出异常。 throw objEx; } return(lngRes); }
public long DeleteRow(System.Security.Principal.IPrincipal p_objPrincipal, string p_strSeq) { long lngRes = 0; clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService(); lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.HIS.clsCheckDeptRoleSvc", "DeleteRow"); if (lngRes < 0) { return(-1); } com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); string strSQL = @"DELETE FROM T_OPR_CHECKDEPT_ROLE WHERE SEQ_INT = ?"; try { System.Data.IDataParameter[] objLisAddItemRefArr = null; objHRPSvc.CreateDatabaseParameter(1, out objLisAddItemRefArr); //Please change the datetime and reocrdid objLisAddItemRefArr[0].Value = Convert.ToInt16(p_strSeq); // objHRPSvc.lngExecuteParameterSQL(strSQL, ref lngRes, objLisAddItemRefArr); objHRPSvc.Dispose(); } catch (Exception objEx) { string strTmp = objEx.Message; com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public long m_lngDeleteMultiUnit(clsMultiunit_drug_VO p_objVO) { string strSQL = @"delete from t_bse_itemmultiunit_drug a where a.itemid_chr = ? and a.unit_vchr= ? and a.package_dec= ?"; long lngRes = -1; long lngAffter = -1; //DataTable dtbValue = new DataTable(); try { clsHRPTableService objHRPSvc = new clsHRPTableService(); IDataParameter[] ParamArr = null; objHRPSvc.CreateDatabaseParameter(3, out ParamArr); ParamArr[0].Value = p_objVO.m_strItemId; ParamArr[1].Value = p_objVO.m_strUnit; ParamArr[2].DbType = DbType.Int16; ParamArr[2].Value = p_objVO.m_intPackage; lngRes = objHRPSvc.lngExecuteParameterSQL(strSQL, ref lngAffter, ParamArr); //lngRes = objHRPSvc.lngGetDataTableWithParameters(strSQL, ref dtbValue, ParamArr); objHRPSvc.Dispose(); } catch (Exception objEx) { string strTmp = objEx.Message; com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public long m_lngUpdateLIMITRATE(clsBIHPatientInfo objPatient) { long lngAff = 0; long lngRes = 0; com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); System.Data.IDataParameter[] arrParams = null; DataTable dtbResult = new DataTable(); string strSQL = ""; strSQL = @" update T_Opr_BIH_Register set LIMITRATE_MNY=? where REGISTERID_CHR=? "; int n = -1; objHRPSvc.CreateDatabaseParameter(2, out arrParams); n++; arrParams[n].Value = objPatient.m_dblLIMITRATE_MNY; n++; arrParams[n].Value = objPatient.m_strRegisterID; try { lngRes = objHRPSvc.lngExecuteParameterSQL(strSQL, ref lngAff, arrParams); } catch (Exception objEx) { string strTmp = objEx.Message; com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public long m_lngUpdateOrderREMARK_VCHR(clsBIHOrder order) { long lngAff = 0; long lngRes = 0; com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); System.Data.IDataParameter[] arrParams = null; DataTable dtbResult = new DataTable(); string strSQL = ""; strSQL = @" update t_opr_bih_order set REMARK_VCHR=? where ORDERID_CHR=? "; int n = -1; objHRPSvc.CreateDatabaseParameter(2, out arrParams); n++; arrParams[n].Value = order.m_strREMARK_VCHR; n++; arrParams[n].Value = order.m_strOrderID; try { lngRes = objHRPSvc.lngExecuteParameterSQL(strSQL, ref lngAff, arrParams); } catch (Exception objEx) { string strTmp = objEx.Message; com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public long m_lngInsert(System.Security.Principal.IPrincipal p_objPrincipal, clsLisQCSampleLotParaVO clsLisQCSamplePara) { long lngRes = 0; clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService(); lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, m_strCurrentSvcDetailName, "m_lngInsert"); if (lngRes <= 0) { return(-1); } com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); try { lngRes = 0; System.Data.IDataParameter[] objODPArr = GetInsertDataParameterArr(clsLisQCSamplePara); long lngRecEff = -1; //往表增加记录 lngRes = 0; lngRes = objHRPSvc.lngExecuteParameterSQL(m_strInsertSql, ref lngRecEff, objODPArr); objHRPSvc.Dispose(); } catch (Exception objEx) { new clsLogText().LogError(objEx); } return(lngRes); }
private long m_lngAddRelate(clsUnitPropertyRelate_VO p_objVO) { long lngRes = 0; string strSQL = @"INSERT INTO t_aid_lis_unit_propert_relate (APPLY_UNIT_ID_CHR, UNIT_PROPERTY_ID_CHR, PRIORITY_NUM,VALUE_ID_CHR ) VALUES (?, ?,?,?)" ; try { com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); System.Data.IDataParameter[] objDPArr = null; objHRPSvc.CreateDatabaseParameter(4, out objDPArr); objDPArr[0].Value = p_objVO.m_strAPPLY_UNIT_ID_CHR; objDPArr[1].Value = p_objVO.m_strUNIT_PROPERTY_ID_CHR; objDPArr[2].Value = p_objVO.m_intPRIORITY_NUM; objDPArr[3].Value = p_objVO.m_strVALUE_ID_CHR; long lngRecEff = -1; lngRes = objHRPSvc.lngExecuteParameterSQL(strSQL, ref lngRecEff, objDPArr); } catch (Exception objEx) { com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); throw objEx; } return(lngRes); }
private long m_lngUpdatePropertyValue(clsUnitPropertyValue_VO p_objVO) { long lngRes = 0; string strSQL = @"UPDATE t_aid_lis_unit_property_value SET PROPERTY_ID_CHR = ?, VLAUE_VCHR = ?, INUSE_FLAG_NUM = ? WHERE VLAUE_ID_CHR = ?" ; try { System.Data.IDataParameter[] objDPArr = null; com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); objHRPSvc.CreateDatabaseParameter(4, out objDPArr); objDPArr[0].Value = p_objVO.m_strPROPERTY_ID_CHR; objDPArr[1].Value = p_objVO.m_strVLAUE_VCHR; objDPArr[2].Value = p_objVO.m_intINUSE_FLAG_NUM; objDPArr[3].Value = p_objVO.m_strVALUE_ID_CHR; long lngRecEff = -1; //往表t_opr_lis_application增加记录 lngRes = objHRPSvc.lngExecuteParameterSQL(strSQL, ref lngRecEff, objDPArr); } catch (Exception objEx) { com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); throw objEx; } return(lngRes); }
public long m_lngSetAllCurruseFlag_0ByItemId(string p_strMedicineId) { long lngRes = -1; string strSQL = @"update t_bse_itemmultiunit_drug set curruseflag_int=0 where itemid_chr=?"; long lngAffect = -1; try { clsHRPTableService objHRPSvc = new clsHRPTableService(); IDataParameter[] ParamArr = null; objHRPSvc.CreateDatabaseParameter(1, out ParamArr); ParamArr[0].Value = p_strMedicineId; lngRes = objHRPSvc.lngExecuteParameterSQL(strSQL, ref lngAffect, ParamArr); objHRPSvc.Dispose(); } catch (Exception objEx) { string strTmp = objEx.Message; com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public long m_lngDelete(System.Security.Principal.IPrincipal p_objPrincipal, string p_strCheckItemId, int p_intQCSmplotSeq) { long lngRes = 0; clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService(); lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, m_strCurrentSvcDetailName, "m_lngDelete"); if (lngRes <= 0) { return(-1); } com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); try { System.Data.IDataParameter[] objODPArr = clsPublicSvc.m_objConstructIDataParameterArr(p_strCheckItemId, p_intQCSmplotSeq); long lngRecEff = -1; lngRes = 0; lngRes = objHRPSvc.lngExecuteParameterSQL(m_strDeleteSql, ref lngRecEff, objODPArr); objHRPSvc.Dispose(); } catch (Exception objEx) { new clsLogText().LogError(objEx); } return(lngRes); }
public long m_lngUpdate(clsYBDefPayTypeVO objVo) { long lngRes = 0; string SQL = @"update t_opr_bih_ybdefpaytype set jslx = ?, rylb = ? where paytypeid_chr = ? "; long lngAffter = 0; try { clsHRPTableService objHRPSvc = new clsHRPTableService(); IDataParameter[] param = null; objHRPSvc.CreateDatabaseParameter(3, out param); param[0].Value = objVo.m_strYBJslx; param[1].Value = objVo.m_strYBRylb; param[2].Value = objVo.m_strPayTypeId; lngRes = objHRPSvc.lngExecuteParameterSQL(SQL, ref lngAffter, param); objHRPSvc.Dispose(); } catch (Exception objEx) { lngRes = 0; new clsLogText().LogError(objEx); } return(lngRes); }
public long m_lngModifyRejectReason(System.Security.Principal.IPrincipal p_objPrincipal, clsMS_RejectReason p_objReason) { if (p_objReason == null) { return(-1); } long lngRes = -1; try { string strSQL = @"update t_ms_rejectreasonset set reasondesc_vchr = ? where reasonid_int = ?"; clsHRPTableService objHRPServ = new clsHRPTableService(); IDataParameter[] objDPArr = null; objHRPServ.CreateDatabaseParameter(2, out objDPArr); objDPArr[0].Value = p_objReason.m_strREASONDESC_VCHR; objDPArr[1].Value = p_objReason.m_intREASONID_INT; long lngEff = -1; lngRes = objHRPServ.lngExecuteParameterSQL(strSQL, ref lngEff, objDPArr); p_objReason = null; } catch (Exception objEx) { com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public long m_lngAddMultiUnit(clsMultiunit_drug_VO p_objVO) { string strSQL = @"insert into t_bse_itemmultiunit_drug a (a.itemid_chr, a.unit_vchr, a.package_dec, a.curruseflag_int, status_int ) values (?, ?, ?, ?, ? ) "; long lngRes = -1; long recordAffect = 0; try { clsHRPTableService objHRPSvc = new clsHRPTableService(); IDataParameter[] ParamArr = null; objHRPSvc.CreateDatabaseParameter(5, out ParamArr); ParamArr[0].Value = p_objVO.m_strItemId.Trim(); ParamArr[1].Value = p_objVO.m_strUnit.Trim(); ParamArr[2].DbType = DbType.Int16; ParamArr[2].Value = p_objVO.m_intPackage; ParamArr[3].DbType = DbType.Int16; ParamArr[3].Value = p_objVO.m_intCurruseFlag_Int; ParamArr[4].Value = p_objVO.m_intStauts; lngRes = objHRPSvc.lngExecuteParameterSQL(strSQL, ref recordAffect, ParamArr); objHRPSvc.Dispose(); } catch (Exception objEx) { string strTmp = objEx.Message; com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public long m_lngDelete(System.Security.Principal.IPrincipal p_objPrincipal, int p_intSeq) { long lngRes = 0; clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService(); lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.LIS.clsTmdVendorSvc", "m_lngDelete"); if (lngRes <= 0) { return(-1); } com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); string strSQL = @"DELETE T_BSE_LIS_VENDOR WHERE VENDOR_SEQ_INT = ?"; try { System.Data.IDataParameter[] objODPArr = clsPublicSvc.m_objConstructIDataParameterArr( p_intSeq); long lngRecEff = -1; lngRes = 0; lngRes = objHRPSvc.lngExecuteParameterSQL(strSQL, ref lngRecEff, objODPArr); objHRPSvc.Dispose(); } catch (Exception objEx) { new clsLogText().LogError(objEx); } return(lngRes); }
public long lngUpdateALLFiledsByPrimaryKey(IPrincipal p_objPrincipal, clsBill_VO p_objEntity, int p_Id) { long lngRes = -1; clsHRPTableService HRPSvc = new clsHRPTableService(); clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService(); lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.HIS.clsBillSvc", "lngUpdateALLFiledsByPrimaryKey"); if (lngRes < 0) { return(-1); } string strSQL = "UPDATE t_bse_bill " + " SET " + "billid_int=?,billtype_chr=?,billno_vchr=?,status_int=?,inempid_chr=?,indatetime_dat=?,inoprid_chr=?,inoprdatetime_dat=?,outempid_chr=?,outdatetime_dat=?,outoprid_chr=?,outoprdatetime_dat=?,returnempid_chr=?,returndatetime_dat=?,returnoprid_chr=?,returnoprdatetime_dat=?,useempid_chr=?,usedatetime_dat=?,cancelempid_chr=?,canceldatetime_dat=?,refempid_chr=?,refdatetime_dat=?,note_vchr=?,totalsum_mny=?,acctsum_mny=?,sbsum_mny=?" + " WHERE billid_int= '" + p_Id.ToString() + "'"; try { IDataParameter[] paramArr = null; HRPSvc.CreateDatabaseParameter(26, out paramArr); paramArr[0].Value = p_objEntity.Billid_int; paramArr[1].Value = p_objEntity.Billtype_chr; paramArr[2].Value = p_objEntity.Billno_vchr; paramArr[3].Value = p_objEntity.Status_int; paramArr[4].Value = p_objEntity.Inempid_chr; paramArr[5].Value = p_objEntity.Indatetime_dat; paramArr[6].Value = p_objEntity.Inoprid_chr; paramArr[7].Value = p_objEntity.Inoprdatetime_dat; paramArr[8].Value = p_objEntity.Outempid_chr; paramArr[9].Value = p_objEntity.Outdatetime_dat; paramArr[10].Value = p_objEntity.Outoprid_chr; paramArr[11].Value = p_objEntity.Outoprdatetime_dat; paramArr[12].Value = p_objEntity.Returnempid_chr; paramArr[13].Value = p_objEntity.Returndatetime_dat; paramArr[14].Value = p_objEntity.Returnoprid_chr; paramArr[15].Value = p_objEntity.Returnoprdatetime_dat; paramArr[16].Value = p_objEntity.Useempid_chr; paramArr[17].Value = p_objEntity.Usedatetime_dat; paramArr[18].Value = p_objEntity.Cancelempid_chr; paramArr[19].Value = p_objEntity.Canceldatetime_dat; paramArr[20].Value = p_objEntity.Refempid_chr; paramArr[21].Value = p_objEntity.Refdatetime_dat; paramArr[22].Value = p_objEntity.Note_vchr; paramArr[23].Value = p_objEntity.Totalsum_mny; paramArr[24].Value = p_objEntity.Acctsum_mny; paramArr[25].Value = p_objEntity.Sbsum_mny; long lngRecordsAffected = -1; lngRes = HRPSvc.lngExecuteParameterSQL(strSQL, ref lngRecordsAffected, paramArr); HRPSvc.Dispose(); } catch (Exception objEx) { string strTmp = objEx.Message; clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public long m_lngAddNewRejectReason(System.Security.Principal.IPrincipal p_objPrincipal, clsMS_RejectReason p_objReason, out int p_intReasonID) { p_intReasonID = 1; if (p_objReason == null) { return(-1); } long lngRes = 0; try { int intReasonID = 0; clsHRPTableService objHRPServ = new clsHRPTableService(); string strGetMaxID = @"select max(reasonid_int) from t_ms_rejectreasonset"; DataTable dtbValue = null; lngRes = objHRPServ.lngGetDataTableWithoutParameters(strGetMaxID, ref dtbValue); if (dtbValue == null || dtbValue.Rows.Count == 0) { intReasonID = 1; } else if (dtbValue.Rows.Count == 1) { int intMax = 0; if (!int.TryParse(dtbValue.Rows[0][0].ToString(), out intMax)) { intReasonID = 1; } else { intReasonID = intMax + 1; } } p_intReasonID = intReasonID; string strSQL = @"insert into t_ms_rejectreasonset (reasonid_int, reasondesc_vchr, sortnum_int) values (?, ?, ?)"; IDataParameter[] objDPArr = null; objHRPServ.CreateDatabaseParameter(3, out objDPArr); objDPArr[0].Value = intReasonID; objDPArr[1].Value = p_objReason.m_strREASONDESC_VCHR; objDPArr[2].Value = p_objReason.m_intSORTNUM_INT; long lngEff = -1; lngRes = objHRPServ.lngExecuteParameterSQL(strSQL, ref lngEff, objDPArr); p_objReason = null; } catch (Exception objEx) { com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
/// <summary> /// 删除选定的盘点药品顺序(无货架) /// </summary> /// <param name="p_objPrincipal"></param> /// <param name="p_objOrderArr"></param> /// <returns></returns> public long m_lngDeleteMedicineOrderWithoutPack(System.Security.Principal.IPrincipal p_objPrincipal, clsMS_CheckMedicineOrderVO[] p_objOrderArr) { if (p_objOrderArr == null || p_objOrderArr.Length == 0) { return(-1); } long lngRes = -1; try { string strSQL = @"delete from t_ms_checkmedicineorder where medicineid_chr = ? and storageid_chr = ?"; clsHRPTableService objHRPServ = new clsHRPTableService(); long lngEff = -1; if (clsHRPTableService.bytDatabase_Selector != (byte)clsHRPTableService.enumDatabase_Selector.bytOracle) { IDataParameter[] objDPArr = null; for (int iOr = 0; iOr < p_objOrderArr.Length; iOr++) { objHRPServ.CreateDatabaseParameter(2, out objDPArr); objDPArr[0].Value = p_objOrderArr[iOr].m_strMEDICINEID_CHR; objDPArr[1].Value = p_objOrderArr[iOr].m_strSTORAGEID_CHR; lngRes = objHRPServ.lngExecuteParameterSQL(strSQL, ref lngEff, objDPArr); } } else { DbType[] dbTypes = new DbType[] { DbType.String, DbType.String }; object[][] objValues = new object[2][]; int intItemCount = p_objOrderArr.Length; for (int j = 0; j < objValues.Length; j++) { objValues[j] = new object[intItemCount];//初始化 } for (int iOr = 0; iOr < intItemCount; iOr++) { objValues[0][iOr] = p_objOrderArr[iOr].m_strMEDICINEID_CHR; objValues[1][iOr] = p_objOrderArr[iOr].m_strSTORAGEID_CHR; } lngRes = objHRPServ.m_lngSaveArrayWithParameters(strSQL, objValues, dbTypes); } } catch (Exception objEx) { com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public long m_lngDeleteInputGroup(System.Security.Principal.IPrincipal p_objPrincipal, string strGroupID) { long lngRes = 0; clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService(); lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.LIS.clsInputGroupSvc", "m_lngDeleteInputGroup"); if (lngRes < 0) { return(-1); } com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); string strSQL1 = @"DELETE FROM t_bse_lis_input_group a WHERE a.input_group_id_chr = ?"; string strSQL2 = @"DELETE FROM t_bse_lis_input_group_detail a WHERE a.input_group_id_chr = ?"; try { IDataParameter[] objParamArr = null; objHRPSvc.CreateDatabaseParameter(1, out objParamArr); objParamArr[0].Value = strGroupID; long lngEff = 0; lngRes = 0; lngRes = objHRPSvc.lngExecuteParameterSQL(strSQL1, ref lngEff, objParamArr); if (lngRes > 0) { objHRPSvc.CreateDatabaseParameter(1, out objParamArr); objParamArr[0].Value = strGroupID; lngEff = 0; lngRes = 0; lngRes = objHRPSvc.lngExecuteParameterSQL(strSQL2, ref lngEff, objParamArr); } } catch (Exception objEx) { com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx);//要在LogError方法中抛出异常。 lngRes = 0; } return(lngRes); }
public long m_lngUpdateReasonSort(System.Security.Principal.IPrincipal p_objPrincipal, clsMS_RejectReason[] p_objReason) { if (p_objReason == null || p_objReason.Length == 0) { return(-1); } long lngRes = 0; try { string strSQL = @"update t_ms_rejectreasonset set sortnum_int = ? where reasonid_int = ?"; clsHRPTableService objHRPServ = new clsHRPTableService(); long lngEff = -1; if (clsHRPTableService.bytDatabase_Selector != (byte)clsHRPTableService.enumDatabase_Selector.bytOracle) { IDataParameter[] objDPArr = null; for (int iID = 0; iID < p_objReason.Length; iID++) { objHRPServ.CreateDatabaseParameter(2, out objDPArr); objDPArr[0].Value = p_objReason[iID].m_intSORTNUM_INT; objDPArr[1].Value = p_objReason[iID].m_intREASONID_INT; lngRes = objHRPServ.lngExecuteParameterSQL(strSQL, ref lngEff, objDPArr); } } else { DbType[] dbTypes = new DbType[] { DbType.Int32, DbType.Int32 }; object[][] objValues = new object[2][]; int intItemCount = p_objReason.Length; for (int j = 0; j < objValues.Length; j++) { objValues[j] = new object[intItemCount];//初始化 } for (int iRow = 0; iRow < intItemCount; iRow++) { objValues[0][iRow] = p_objReason[iRow].m_intSORTNUM_INT; objValues[1][iRow] = p_objReason[iRow].m_intREASONID_INT; } lngRes = objHRPServ.m_lngSaveArrayWithParameters(strSQL, objValues, dbTypes); } p_objReason = null; } catch (Exception objEx) { com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public long m_lngAddGrossProfitRateSet(System.Security.Principal.IPrincipal p_objPrincipal, clsMS_GrossProfitRateSet_VO[] p_objRateArr) { if (p_objRateArr == null) { return(-1); } long lngRes = 0; try { string strSQL = @"insert into t_ms_grossprofitrateset (grossprofitrate,medicinetypeid_chr) values (?, ?)"; clsHRPTableService objHRPServ = new clsHRPTableService(); long lngEff = -1; if (clsHRPTableService.bytDatabase_Selector != (byte)clsHRPTableService.enumDatabase_Selector.bytOracle) { IDataParameter[] objDPArr = null; for (int iRow = 0; iRow < p_objRateArr.Length; iRow++) { objHRPServ.CreateDatabaseParameter(2, out objDPArr); objDPArr[0].Value = p_objRateArr[iRow].m_dblGROSSPROFITRATE; objDPArr[1].Value = p_objRateArr[iRow].m_strMEDICINETYPEID_CHR; lngRes = objHRPServ.lngExecuteParameterSQL(strSQL, ref lngEff, objDPArr); } } else { DbType[] dbTypes = new DbType[] { DbType.Double, DbType.String }; object[][] objValues = new object[2][]; int intItemCount = p_objRateArr.Length; for (int j = 0; j < objValues.Length; j++) { objValues[j] = new object[intItemCount];//初始化 } for (int iRow = 0; iRow < intItemCount; iRow++) { objValues[0][iRow] = p_objRateArr[iRow].m_dblGROSSPROFITRATE; objValues[1][iRow] = p_objRateArr[iRow].m_strMEDICINETYPEID_CHR; } lngRes = objHRPServ.m_lngSaveArrayWithParameters(strSQL, objValues, dbTypes); } } catch (Exception objEx) { com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public long m_lngAddNewAppApplyUint(clsT_OPR_LIS_APP_APPLY_UNIT_VO[] arrRecodes) { long lngRes = 0; long lngReff = 0; bool isNull = arrRecodes == null || arrRecodes.Length == 0; if (isNull) { throw new Exception("生成申请单与申请单元的关系失败!"); } #region == SQL == string sql = @" insert into t_opr_lis_app_apply_unit ( application_id_chr, user_group_string, apply_unit_id_chr ) values (?, ?, ?) "; #endregion try { clsHRPTableService dbSvc = new clsHRPTableService(); #region 循环赋值 for (int i = 0; i < arrRecodes.Length; i++) { clsT_OPR_LIS_APP_APPLY_UNIT_VO applyUnitVO = arrRecodes[i]; if (applyUnitVO != null) { lngRes = 0; IDataParameter[] arrParms = null; dbSvc.CreateDatabaseParameter(3, out arrParms); arrParms[0].Value = applyUnitVO.m_strAPPLICATION_ID_CHR; arrParms[1].Value = applyUnitVO.m_strUSER_GROUP_STRING; arrParms[2].Value = applyUnitVO.m_strAPPLY_UNIT_ID_CHR; lngRes = dbSvc.lngExecuteParameterSQL(sql, ref lngReff, arrParms); } } #endregion dbSvc.Dispose(); } catch (Exception ex) { ThrowException(ex); } return(lngRes); }
public long UpdateOrderBooking(System.Security.Principal.IPrincipal p_objPrincipal, string p_bookID, string p_bookDate, string p_bookStatus, string p_remark, string p_confirmer) { long lngRes = 0; clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService(); lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.HIS.clsOrderBookingSvc", "UpdateOrderBooking"); if (lngRes < 0) { return(-1); } string strSQLUpdate; try { com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); System.Data.IDataParameter[] objLisAddItemRefArr = null; strSQLUpdate = @"UPDATE T_OPR_BIH_ORDER_BOOKING SET BOOK_DAT = ?, REMARK_VCHR = ?, BOOKSTATUS_INT = ?, CONFIRMERID_CHR = ?, CONFIRM_DAT = SYSDATE WHERE BOOKID_INT = ?"; objHRPSvc.CreateDatabaseParameter(5, out objLisAddItemRefArr); if (p_bookDate == null) { objLisAddItemRefArr[0].Value = null; } else { objLisAddItemRefArr[0].Value = Convert.ToDateTime(p_bookDate); } objLisAddItemRefArr[1].Value = p_remark; objLisAddItemRefArr[2].Value = Convert.ToInt16(p_bookStatus); objLisAddItemRefArr[3].Value = p_confirmer; objLisAddItemRefArr[4].Value = Convert.ToInt32(p_bookID); long lngRecEff = -1; lngRes = objHRPSvc.lngExecuteParameterSQL(strSQLUpdate, ref lngRecEff, objLisAddItemRefArr); objHRPSvc.Dispose(); } catch (Exception objEx) { string strTmp = objEx.Message; com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public long m_lngInsertCheckItemCustomOrder(System.Security.Principal.IPrincipal p_objPrincipal, clsLisCheckItemCustomOrder p_objCheckItemCustomOrderVO) { long lngRes = 0; clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService(); lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, strClassName, "m_lngInsertCheckItemCustomOrder"); if (lngRes <= 0) { return(lngRes); } string strSQL = null; clsHRPTableService objHRPSvc = null; try { strSQL = @"insert into t_bse_lis_check_item_cutomorde (check_item_id_chr, air_blank_chr, jin_plate_way_chr, shock_speed_chr, shock_time_chr, wavelength_chr, filter_chr, deputy_filter_chr) values (?, ?, ?, ?, ?, ?, ?, ?) "; IDataParameter[] objDPArr = null; objHRPSvc = new clsHRPTableService(); objHRPSvc.CreateDatabaseParameter(8, out objDPArr); objDPArr[0].Value = p_objCheckItemCustomOrderVO.m_strCheckItemID; objDPArr[1].Value = p_objCheckItemCustomOrderVO.m_strAir_blank; objDPArr[2].Value = p_objCheckItemCustomOrderVO.m_strJin_plate_way_chr; objDPArr[3].Value = p_objCheckItemCustomOrderVO.m_strShock_speed_chr; objDPArr[4].Value = p_objCheckItemCustomOrderVO.m_strShock_time_chr; objDPArr[5].Value = p_objCheckItemCustomOrderVO.m_strWavelength_chr; objDPArr[6].Value = p_objCheckItemCustomOrderVO.m_strFilter_chr; objDPArr[7].Value = p_objCheckItemCustomOrderVO.m_strDeputy_filter_chr; long lngEff = 0; lngRes = objHRPSvc.lngExecuteParameterSQL(strSQL, ref lngEff, objDPArr); } catch (Exception objEx) { clsLogText objLogger = new clsLogText(); objLogger.LogDetailError(objEx, true); } finally { strSQL = null; objPrivilege = null; objHRPSvc = null; } return(lngRes); }
public long m_lngSaveMedicine(clsDS_MedicineLimit[] p_objLimit) { long lngRes = -1; string strSQLQuery = @"select tiptoplimit_int,neaplimit_int from t_ds_medlimit where drugstoreid_chr = ? and medicineid_chr = ?"; string strSQLEdit = @"update t_ds_medlimit set tiptoplimit_int = ?,neaplimit_int = ? where drugstoreid_chr = ? and medicineid_chr = ?"; string strSQLNew = @"insert into t_ds_medlimit (tiptoplimit_int,neaplimit_int,drugstoreid_chr,medicineid_chr) values (?,?,?,?)"; clsHRPTableService objHRPServ = new clsHRPTableService(); DataTable dtbResult = new DataTable(); IDataParameter[] objDPQueryArr = null; IDataParameter[] objDPEditArr = null; IDataParameter[] objDPNewArr = null; for (int iOr = 0; iOr < p_objLimit.Length; iOr++) { objHRPServ.CreateDatabaseParameter(2, out objDPQueryArr); objDPQueryArr[0].Value = p_objLimit[iOr].m_strDrugstoreid_chr; objDPQueryArr[1].Value = p_objLimit[iOr].m_strMedicineid_chr; lngRes = objHRPServ.lngGetDataTableWithParameters(strSQLQuery, ref dtbResult, objDPQueryArr); if (dtbResult.Rows.Count > 0) { objHRPServ.CreateDatabaseParameter(4, out objDPEditArr); objDPEditArr[0].Value = p_objLimit[iOr].m_dblTiptoplimit_int; objDPEditArr[1].Value = p_objLimit[iOr].m_dblNeaplimit_int; objDPEditArr[2].Value = p_objLimit[iOr].m_strDrugstoreid_chr; objDPEditArr[3].Value = p_objLimit[iOr].m_strMedicineid_chr; lngRes = objHRPServ.lngExecuteParameterSQL(strSQLEdit, ref lngRes, objDPEditArr); } else { objHRPServ.CreateDatabaseParameter(4, out objDPNewArr); objDPNewArr[0].Value = p_objLimit[iOr].m_dblTiptoplimit_int; objDPNewArr[1].Value = p_objLimit[iOr].m_dblNeaplimit_int; objDPNewArr[2].Value = p_objLimit[iOr].m_strDrugstoreid_chr; objDPNewArr[3].Value = p_objLimit[iOr].m_strMedicineid_chr; lngRes = objHRPServ.lngExecuteParameterSQL(strSQLNew, ref lngRes, objDPNewArr); } } objHRPServ.Dispose(); objHRPServ = null; return(lngRes); }
public long m_lngAddNewAppSampleGroup(clsT_OPR_LIS_APP_SAMPLE_VO[] p_objRecordVOArr) { long lngRes = 0; long lngReff = 0; string sql = @" insert into t_opr_lis_app_sample ( application_id_chr, sample_group_id_chr, report_group_id_chr, sample_id_chr ) values (?,?,?,?) "; try { clsHRPTableService objHRPSvc = new clsHRPTableService(); bool isNull = p_objRecordVOArr == null || p_objRecordVOArr.Length == 0; if (isNull) { throw new Exception(string.Format("要生成的申请单下要做的标本组为空!{0}", clsTip.ErrorMessageTip)); } #region 循环赋值 for (int i = 0; i < p_objRecordVOArr.Length; i++) { clsT_OPR_LIS_APP_SAMPLE_VO sampleVO = p_objRecordVOArr[i]; if (sampleVO != null) { lngRes = 0; IDataParameter[] arrParams = null; objHRPSvc.CreateDatabaseParameter(4, out arrParams); arrParams[0].Value = sampleVO.m_strAPPLICATION_ID_CHR; arrParams[1].Value = sampleVO.m_strSAMPLE_GROUP_ID_CHR; arrParams[2].Value = sampleVO.m_strREPORT_GROUP_ID_CHR; arrParams[3].Value = sampleVO.m_strSAMPLE_ID_CHR; lngRes = objHRPSvc.lngExecuteParameterSQL(sql, ref lngReff, arrParams); } } #endregion objHRPSvc.Dispose(); } catch (Exception objEx) { new clsLogText().LogError(objEx); } return(lngRes); }
public long m_lngAddAppUserGroup(System.Security.Principal.IPrincipal p_objPrincipal, ref clsApplUserGroup_VO objApplUserGroup) { long lngRes = 0; clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService(); lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.LIS.clsAppGroupSvc", "m_lngAddAppUserGroup"); if (lngRes < 0) { return(-1); } string strSQL = @"INSERT INTO t_aid_lis_appuser_group (user_group_id_chr, user_group_name_vchr, has_child_group, py_code_chr, assist_code01_chr, wb_code_chr, assist_code02_chr, group_flag_chr, operator_id_chr,summary_vchr ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?,?)" ; try { com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); System.Data.IDataParameter[] objApplUserGroupArr = null; objHRPSvc.CreateDatabaseParameter(10, out objApplUserGroupArr); if (objApplUserGroup.strUserGroupID == null) { objApplUserGroup.strUserGroupID = objHRPSvc.m_strGetNewID("t_aid_lis_appuser_group", "user_group_id_chr", 6); } objApplUserGroupArr[0].Value = objApplUserGroup.strUserGroupID; objApplUserGroupArr[1].Value = objApplUserGroup.strUserGroupName; objApplUserGroupArr[2].Value = objApplUserGroup.strHasChildGroup; objApplUserGroupArr[3].Value = objApplUserGroup.strPYCode; objApplUserGroupArr[4].Value = objApplUserGroup.strAssistCode01; objApplUserGroupArr[5].Value = objApplUserGroup.strWBCode; objApplUserGroupArr[6].Value = objApplUserGroup.strAssistCode02; objApplUserGroupArr[7].Value = objApplUserGroup.strGroupFlag; objApplUserGroupArr[8].Value = objApplUserGroup.strOperatorID; objApplUserGroupArr[9].Value = objApplUserGroup.strSummary; long lngRecEff = -1; lngRes = objHRPSvc.lngExecuteParameterSQL(strSQL, ref lngRecEff, objApplUserGroupArr); objHRPSvc.Dispose(); } catch (Exception objEx) { com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }