public long m_lngGetMedicine(string p_strMedicineid, out DataTable p_dtTable) { long lngRes = 0; p_dtTable = new DataTable(); DataTable p_dtTemp = new DataTable(); string strSQL = string.Empty; try { strSQL = @"select a.medicinename_vchr, a.medspec_vchr, a.opunit_chr, a.productorid_chr, a.unitprice_mny, '' reason_vchr from t_bse_medicine a where a.medicineid_chr = ?"; clsHRPTableService objHRPServ = new clsHRPTableService(); IDataParameter[] objDPArr = null; objHRPServ.CreateDatabaseParameter(1, out objDPArr); objDPArr[0].Value = p_strMedicineid; lngRes = objHRPServ.lngGetDataTableWithParameters(strSQL, ref p_dtTable, objDPArr); if (p_dtTable != null && p_dtTable.Rows.Count > 0) { strSQL = @"select reason_vchr from (select b.reason_vchr from t_ms_adjustprice_detail b where b.status_int = 1 and b.medicineid_chr = ? order by b.seriesid_int desc) where rownum = 1"; objDPArr = null; objHRPServ.CreateDatabaseParameter(1, out objDPArr); objDPArr[0].Value = p_strMedicineid; lngRes = objHRPServ.lngGetDataTableWithParameters(strSQL, ref p_dtTemp, objDPArr); if (p_dtTemp != null && p_dtTemp.Rows.Count > 0) { p_dtTable.Rows[0]["reason_vchr"] = p_dtTemp.Rows[0]["reason_vchr"]; } } objHRPServ.Dispose(); objHRPServ = null; } catch (Exception ex) { com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText(); bool blnRes = objLogger.LogError(ex); } return(lngRes); }
public long m_lngSaveOutPatientDefaultAddItem(ArrayList RecordsArr, int Flag, string PayTypeID) { long lngRes = 0, lngAffects = 0; //执行SQL string SQL = ""; try { clsHRPTableService objHRPSvc = new clsHRPTableService(); IDataParameter[] ParamArr = null; if (PayTypeID != "") { SQL = @"delete from t_aid_outpatientdefaultadditem where paytypeid_chr = ?"; objHRPSvc.CreateDatabaseParameter(1, out ParamArr); ParamArr[0].Value = PayTypeID; lngRes = objHRPSvc.lngExecuteParameterSQL(SQL, ref lngAffects, ParamArr); if (Flag == -1) { return(lngRes); } } for (int i = 0; i < RecordsArr.Count; i++) { clsOutPatientDefaultAddItem_VO DefaultAddItem_VO = RecordsArr[i] as clsOutPatientDefaultAddItem_VO; SQL = @"insert into t_aid_outpatientdefaultadditem (paytypeid_chr, itemid_chr, qty_dec, regflag_int, recflag_int, dutyname_vchr, begintime_chr, endtime_chr,deptid_chr) values (?, ?, ?, ?, ?, ?, ?, ?,?)"; objHRPSvc.CreateDatabaseParameter(9, out ParamArr); ParamArr[0].Value = DefaultAddItem_VO.PayTypeID; ParamArr[1].Value = DefaultAddItem_VO.ItemID; ParamArr[2].Value = DefaultAddItem_VO.Qty; ParamArr[3].Value = DefaultAddItem_VO.RegFlag; ParamArr[4].Value = DefaultAddItem_VO.RecFlag; ParamArr[5].Value = DefaultAddItem_VO.DutyID; ParamArr[6].Value = DefaultAddItem_VO.BeginTime; ParamArr[7].Value = DefaultAddItem_VO.EndTime; ParamArr[8].Value = DefaultAddItem_VO.DeptID; lngRes = objHRPSvc.lngExecuteParameterSQL(SQL, ref lngAffects, ParamArr); } } catch (Exception objEx) { string strTmp = objEx.Message; com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public long m_lngSaveNewPatientSPECREMARK(System.Security.Principal.IPrincipal p_objPrincipal, clsSpecreMark_VO m_objSpecreMark_VO) { long lngRes = 0; clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService(); lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.HIS.clsSpecreMarkSvc", "m_lngSaveNewPatientSPECREMARK"); if (lngRes < 0) { return(-1); } try { clsHRPTableService objHRPSvc = new clsHRPTableService(); lngRes = 0; string strSQL = ""; //新增记录 strSQL = @"insert into T_OPR_BIH_PATSPECREMARK (SEQ_INT, REGISTERID_CHR, REMARKID_CHR, REMARKNAME_VCHR, CREATORID_CHR, CREAT_DAT, CHARGECTL_INT) values(seq_public.NEXTVAL, ?, ?, ?, ?, sysdate, ?)"; System.Data.IDataParameter[] arrParams = null; objHRPSvc.CreateDatabaseParameter(5, out arrParams); arrParams[0].Value = m_objSpecreMark_VO.m_strREGISTERID_CHR; arrParams[1].Value = m_objSpecreMark_VO.m_strREMARKID_CHR; arrParams[2].Value = m_objSpecreMark_VO.m_strREMARKNAME_VCHR; arrParams[3].Value = m_objSpecreMark_VO.m_strCREATORID_CHR; arrParams[4].Value = m_objSpecreMark_VO.m_intCHARGECTL_INT; long lngAff = 0; lngRes = objHRPSvc.lngExecuteParameterSQL(strSQL, ref lngAff, arrParams); strSQL = @" update t_opr_bih_register set des_vchr=? where registerid_chr =? "; System.Data.IDataParameter[] arrParams2 = null; objHRPSvc.CreateDatabaseParameter(2, out arrParams2); arrParams2[0].Value = m_objSpecreMark_VO.m_strDec_vchr; arrParams2[1].Value = m_objSpecreMark_VO.m_strREGISTERID_CHR; lngRes = objHRPSvc.lngExecuteParameterSQL(strSQL, ref lngAff, arrParams2); 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_lngSaveRepeatPrn(string BillID, string OldBillNo, string NewBillNo, string Empid, string BillType) { long lngRes = 0, lngAffects = 0; string SQL = ""; string repbillno = this.m_strGetrepeatprnbillno(BillID, OldBillNo, BillType); try { clsHRPTableService objHRPSvc = new clsHRPTableService(); IDataParameter[] ParamArr = null; if (repbillno != "") { SQL = @"update t_opr_bih_billrepeatprint set printstatus_int = -1 where billid_chr = ? and billtype_chr = ? and repprnbillno_vchr = ?"; objHRPSvc.CreateDatabaseParameter(3, out ParamArr); ParamArr[0].Value = BillID; ParamArr[1].Value = BillType; ParamArr[2].Value = repbillno; lngRes = objHRPSvc.lngExecuteParameterSQL(SQL, ref lngAffects, ParamArr); OldBillNo = repbillno; } SQL = @"insert into t_opr_bih_billrepeatprint(billtype_chr, billid_chr, sourcebillno_vchr, repprnbillno_vchr, printemp_chr, printdate_dat, printstatus_int) values(?, ?, ?, ?, ?, sysdate, 0)"; objHRPSvc.CreateDatabaseParameter(5, out ParamArr); ParamArr[0].Value = BillType; ParamArr[1].Value = BillID; ParamArr[2].Value = OldBillNo; ParamArr[3].Value = NewBillNo; ParamArr[4].Value = Empid; lngRes = objHRPSvc.lngExecuteParameterSQL(SQL, ref lngAffects, ParamArr); } catch (Exception objEx) { com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public long m_lngChargeItemTypeByInvoice(string p_strInvoiceNo, out DataTable p_dtResultTable) { long lngRes = -1; p_dtResultTable = new DataTable(); string strSQL = @"select t.itemcatid_chr, t.tolfee_mny, t.invoiceno_vchr, t.seqid_chr, t.sbsum_mny from t_opr_outpatientrecipeinvde t where t.invoiceno_vchr = ?"; clsHRPTableService objHRPSvc = new clsHRPTableService(); IDataParameter[] ParamArr = null; objHRPSvc.CreateDatabaseParameter(1, out ParamArr); ParamArr[0].Value = p_strInvoiceNo; try { lngRes = objHRPSvc.lngGetDataTableWithParameters(strSQL, ref p_dtResultTable, ParamArr); if (p_dtResultTable == null || p_dtResultTable.Rows.Count == 0) { strSQL = @"select t.itemcatid_chr, t.tolfee_mny, t.invoiceno_vchr, t.seqid_chr, t.sbsum_mny from t_opr_outpatientrecipeinvde t inner join t_opr_outpatientrecipeinv b on t.invoiceno_vchr = b.invoiceno_vchr inner join t_opr_invoicerepeatprint c on b.seqid_chr = c.seqid_chr where c.repprninvono_vchr = ?"; objHRPSvc.CreateDatabaseParameter(1, out ParamArr); ParamArr[0].Value = p_strInvoiceNo; lngRes = objHRPSvc.lngGetDataTableWithParameters(strSQL, ref p_dtResultTable, 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_lngCheckHasSetOtherType(System.Security.Principal.IPrincipal p_objPrincipal, string p_strTypeID, out string p_strSetName) { p_strSetName = string.Empty; long lngRes = 0; try { string strSQL = @"select medicinetypesetname from t_ms_medicinetypeset where medicinetypeid_chr = ?"; clsHRPTableService objHRPServ = new clsHRPTableService(); IDataParameter[] objDPArr = null; objHRPServ.CreateDatabaseParameter(1, out objDPArr); objDPArr[0].Value = p_strTypeID; DataTable dtbValue = null; lngRes = objHRPServ.lngGetDataTableWithParameters(strSQL, ref dtbValue, objDPArr); if (lngRes > 0 && dtbValue != null) { if (dtbValue.Rows.Count > 0) { p_strSetName = dtbValue.Rows[0][0].ToString(); } } } catch (Exception objEx) { com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public long m_lngGetAdjustmentSeriesid(System.Security.Principal.IPrincipal p_objPrincipal, long m_lngMainSeq, out long m_lngDSMainSeq) { DataTable p_dtbValue = null; long lngRes = 0; m_lngDSMainSeq = 0; try { string strSQL = @"select a.seriesid_int from t_ds_adjustprice a where a.msseriesid_int=?"; clsHRPTableService objHRPServ = new clsHRPTableService(); IDataParameter[] objDPArr = null; objHRPServ.CreateDatabaseParameter(1, out objDPArr); objDPArr[0].Value = m_lngMainSeq; lngRes = objHRPServ.lngGetDataTableWithParameters(strSQL, ref p_dtbValue, objDPArr); objHRPServ.Dispose(); objHRPServ = null; if (lngRes > 0 && p_dtbValue.Rows.Count > 0) { m_lngDSMainSeq = Convert.ToInt64(p_dtbValue.Rows[0]["seriesid_int"]); } } catch (Exception objEx) { com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public bool IsWechatBanding(string cardNo) { string Sql = @"select t.cardno from opRegWeChatBinding t where t.cardno = ? and t.status = 1"; try { clsHRPTableService svc = new clsHRPTableService(); IDataParameter[] parm = null; svc.CreateDatabaseParameter(1, out parm); parm[0].Value = cardNo; DataTable dt = null; svc.lngGetDataTableWithParameters(Sql, ref dt, parm); svc.Dispose(); if (dt != null && dt.Rows.Count > 0) { return(true); // 存在绑定 } } catch (Exception objEx) { string strTmp = objEx.Message; com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(false); }
public long m_lngGetOutPatientDefaultAddItem(out DataTable dt, string PayTypeID) { long lngRes = 0; string SQL = @"select a.paytypeid_chr, a.itemid_chr, a.qty_dec, a.regflag_int, a.recflag_int, a.dutyname_vchr, a.begintime_chr, a.endtime_chr, b.itemname_vchr, b.ipchargeflg_int, b.itemprice_mny, round (b.itemprice_mny / b.packqty_dec, 4) as submoney, b.itemspec_vchr, b.itemunit_chr, b.itemipunit_chr,a.deptid_chr from t_aid_outpatientdefaultadditem a, t_bse_chargeitem b where a.itemid_chr = b.itemid_chr(+) and a.paytypeid_chr = ? order by a.begintime_chr"; dt = new DataTable(); try { clsHRPTableService objHRPSvc = new clsHRPTableService(); IDataParameter[] ParamArr = null; objHRPSvc.CreateDatabaseParameter(1, out ParamArr); ParamArr[0].Value = PayTypeID; lngRes = objHRPSvc.lngGetDataTableWithParameters(SQL, ref dt, 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_lngInsertStoreInfo(clsMS_StorInfoVo m_Stor) { IDataParameter[] objDPArr = null; clsHRPTableService objHRPServ = new clsHRPTableService(); string strSQL = @"insert into t_ms_storagerackset (storagerackid_chr, storagerackcode_vchr,storageid_chr ,typeid_int ,storagerackname_vchr, pycode_chr,wbcode_chr) values (?,?,?,?,?,?,?)"; objHRPServ.CreateDatabaseParameter(7, out objDPArr); objDPArr[0].Value = m_lngGetMaxId(); objDPArr[1].Value = m_Stor.m_storId; objDPArr[2].Value = m_Stor.m_ageID; objDPArr[3].Value = m_Stor.m_intTypeid; objDPArr[4].Value = m_Stor.m_storName; objDPArr[5].Value = m_Stor.m_pycode; objDPArr[6].Value = m_Stor.m_wbcode; long lngEff = -1; long lngRes = objHRPServ.lngExecuteParameterSQL(strSQL, ref lngEff, objDPArr); return(lngRes); }
public long m_mthAddNewReportInfo2(System.Security.Principal.IPrincipal p_objPrincipal, clsReportDetail_VO obj_VO) { long lngRes = 0; clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService(); lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.HIS.clsReportMaintenanceSvc", "m_mthAddNewReportInfo2"); if (lngRes < 0) { return(-1); } com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); string strSQL = "INSERT INTO T_AID_RPT_GOP_DEF (RPTID_CHR,GROUPID_CHR,GROUPNAME_CHR) VALUES (?,?,?)"; try { System.Data.IDataParameter[] objLisAddItemRefArr = null; objHRPSvc.CreateDatabaseParameter(3, out objLisAddItemRefArr); objLisAddItemRefArr[0].Value = obj_VO.strReportID; //p_objRecord.m_strAPPID_CHR; objLisAddItemRefArr[1].Value = obj_VO.strGroupID; objLisAddItemRefArr[2].Value = obj_VO.strGroupName; long lngRecEff = -1; //往表增加记录 lngRes = objHRPSvc.lngExecuteParameterSQL(strSQL, 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_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_mthSearchDept(string strStoreid, out DataTable dtDept) { dtDept = new DataTable(); long lngRes = 0; StringBuilder strSQL = new StringBuilder(""); try { strSQL.Append(@"select a.instoragedept_chr deptid_chr from t_aid_outindeptrelation a where a.outstoragedept_chr=?"); clsHRPTableService objHRPServ = new clsHRPTableService(); IDataParameter[] objDPArr = null; objHRPServ.CreateDatabaseParameter(1, out objDPArr); objDPArr[0].Value = strStoreid; lngRes = objHRPServ.lngGetDataTableWithParameters(strSQL.ToString(), ref dtDept, objDPArr); objHRPServ.Dispose(); objHRPServ = null; } catch (Exception objEx) { com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public long m_lngDeleteMedStoreSetInfo(System.Security.Principal.IPrincipal p_objPrincipal, string strStoreID) { if (strStoreID == null) { return(-1); } long lngRes = 0; try { string strSQL = @" delete from t_ds_medstoreset where medstoreid = ?"; clsHRPTableService objHRPServ = new clsHRPTableService(); IDataParameter[] objDPArr = null; objHRPServ.CreateDatabaseParameter(1, out objDPArr); objDPArr[0].Value = strStoreID; long lngEff = -1; lngRes = objHRPServ.lngExecuteParameterSQL(strSQL, ref lngEff, objDPArr); objHRPServ.Dispose(); objHRPServ = null; } catch (Exception objEx) { com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public long m_lngGetMedicineType(string p_strDrugStoreID, out int m_intMedicineType) { m_intMedicineType = 0; long lngRes = -1; DataTable m_dtbReport = new DataTable(); string strSql = @"select a.medicnetype_int from t_bse_medstore a where a.medstoreid_chr = ?"; try { com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); IDataParameter[] ParamArr = null; objHRPSvc.CreateDatabaseParameter(1, out ParamArr); ParamArr[0].Value = p_strDrugStoreID; lngRes = objHRPSvc.lngGetDataTableWithParameters(strSql, ref m_dtbReport, ParamArr); if (m_dtbReport != null && m_dtbReport.Rows.Count > 0) { m_intMedicineType = Convert.ToInt32(m_dtbReport.Rows[0][0]); } objHRPSvc.Dispose(); } catch (Exception objEx) { string strTmp = objEx.Message; com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public DataTable GetPatientContactInfo(string patientId) { string Sql = string.Empty; DataTable dt = new DataTable(); try { Sql = @"select t.contactpersonfirstname_vchr, t.contactpersonlastname_vchr, t.mobile_chr, t.consigneeaddr from t_bse_patient t where t.patientid_chr = ?"; clsHRPTableService svc = new clsHRPTableService(); IDataParameter[] parm = null; svc.CreateDatabaseParameter(1, out parm); parm[0].Value = patientId; svc.lngGetDataTableWithParameters(Sql, ref dt, parm); svc.Dispose(); } catch (Exception objEx) { string strTmp = objEx.Message; com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(dt); }
public string GetDeptCode(string deptId) { string deptCode = string.Empty; string Sql = @"select t.code_vchr from t_bse_deptdesc t where t.deptid_chr = ?"; try { clsHRPTableService svc = new clsHRPTableService(); IDataParameter[] parm = null; svc.CreateDatabaseParameter(1, out parm); parm[0].Value = deptId; DataTable dt = null; svc.lngGetDataTableWithParameters(Sql, ref dt, parm); svc.Dispose(); if (dt != null && dt.Rows.Count > 0) { deptCode = dt.Rows[0]["code_vchr"].ToString(); } } catch (Exception objEx) { string strTmp = objEx.Message; com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(deptCode); }
private long m_lngAddNewAppUnitItem(clsLisAppUnitItemVO unitItemRelation) { long lngRes = 0; long lngReff = 0; #region == SQL == string sql = @"insert into t_opr_lis_app_unit_item ( application_id_chr, check_item_id_chr, apply_unit_id_chr ) values ( ?, ?, ?) "; #endregion clsHRPTableService objHRPSvc = new clsHRPTableService(); IDataParameter[] arrParams = null; objHRPSvc.CreateDatabaseParameter(3, out arrParams); try { arrParams[0].Value = unitItemRelation.m_strAPPLICATION_ID_CHR; arrParams[1].Value = unitItemRelation.m_strCHECK_ITEM_ID_CHR; arrParams[2].Value = unitItemRelation.m_strAPPLY_UNIT_ID_CHR; //往表增加记录 lngRes = objHRPSvc.lngExecuteParameterSQL(sql, ref lngReff, arrParams); objHRPSvc.Dispose(); } catch (Exception objEx) { new clsLogText().LogError(objEx); } return(lngRes); }
public long m_lngGetAccountPeriod(System.Security.Principal.IPrincipal p_objPrincipal, string m_strDrugStoreid, out DataTable p_dtbAccountData) { p_dtbAccountData = null; long lngRes = 0; try { string strSQL = @"select t.accountid_chr, t.starttime_dat, t.endtime_dat, t.transfertime_dat, t.comment_vchr, t.drugstoreid_chr, t.seriesid_int from t_ds_accountperiod t where t.drugstoreid_chr = ? order by t.accountid_chr"; clsHRPTableService objHRPServ = new clsHRPTableService(); IDataParameter[] objDPArr = null; objHRPServ.CreateDatabaseParameter(1, out objDPArr); objDPArr[0].Value = m_strDrugStoreid; lngRes = objHRPServ.lngGetDataTableWithParameters(strSQL, ref p_dtbAccountData, objDPArr); objHRPServ.Dispose(); objHRPServ = null; } catch (Exception objEx) { com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.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_lngGetempinfo(out DataTable dt, string empno) { long lngRes = 0; dt = new DataTable(); string SQL = @"select empid_chr, lastname_vchr, psw_chr from t_bse_employee where status_int = 1 and empno_chr = ?"; try { clsHRPTableService objHRPSvc = new clsHRPTableService(); IDataParameter[] ParamArr = null; objHRPSvc.CreateDatabaseParameter(1, out ParamArr); //((OracleParameter)ParamArr[0]).OracleDbType = OracleDbType.Char; ParamArr[0].Value = empno; lngRes = objHRPSvc.lngGetDataTableWithParameters(SQL, ref dt, ParamArr); } catch (Exception objEx) { string strTmp = objEx.Message; com.digitalwave.Utility.clsLogText objLogger = new 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_lngUpdate(clsSysParamVO objReader) { long lngRes = 0; string sql = @" update t_bse_sysparm set syscode_chr = ?, parmdesc_vchr = ?, parmvalue_vchr = ?, status_int = ?, note_vchr = ? where parmcode_chr = ? "; clsHRPTableService objHRPSvc = new clsHRPTableService(); IDataParameter[] paramsArr = null; objHRPSvc.CreateDatabaseParameter(6, out paramsArr); paramsArr[0].Value = objReader.m_intSysCode; paramsArr[1].Value = objReader.m_strParamDesc; paramsArr[2].Value = objReader.m_strParamValue; paramsArr[3].Value = objReader.m_intStatus; paramsArr[4].Value = objReader.m_strNote; paramsArr[5].Value = objReader.m_strParamCode; try { long lngRecEff = -1; lngRes = objHRPSvc.lngExecuteParameterSQL(sql, ref lngRecEff, paramsArr); objHRPSvc.Dispose(); } catch (Exception objEx) { new clsLogText().LogError(objEx); } return(lngRes); }
public long m_lngFind(string applicationId, out clsChargeStatusVO chargeStatusVO) { long lngRes = 0; DataTable dt = null; chargeStatusVO = null; string strSQL = @"select * from t_opr_attachrelation where attachid_vchr=? "; try { clsHRPTableService objHRPSvc = new clsHRPTableService(); IDataParameter[] objDPArr = null; objHRPSvc.CreateDatabaseParameter(1, out objDPArr); objDPArr[0].Value = applicationId; lngRes = objHRPSvc.lngGetDataTableWithParameters(strSQL, ref dt, objDPArr); if (lngRes > 0 && dt != null && dt.Rows.Count != 0) { chargeStatusVO = ConstructVO(dt.Rows[0]); } objHRPSvc.Dispose(); } catch (Exception objEx) { new clsLogText().LogError(objEx); } return(lngRes); }
public long m_lngEditStoreInfo(clsMS_StorInfoVo m_Stor) { IDataParameter[] objDPArr = null; clsHRPTableService objHRPServ = new clsHRPTableService(); string strSQL = @"update t_ms_storagerackset set storagerackcode_vchr= ? , storageid_chr= ? , typeid_int= ? , storagerackname_vchr= ? , pycode_chr= ? , wbcode_chr= ? where storagerackid_chr = ?"; objHRPServ.CreateDatabaseParameter(7, out objDPArr); objDPArr[0].Value = m_Stor.m_storId; objDPArr[1].Value = m_Stor.m_ageID; objDPArr[2].Value = m_Stor.m_intTypeid; objDPArr[3].Value = m_Stor.m_storName; objDPArr[4].Value = m_Stor.m_pycode; objDPArr[5].Value = m_Stor.m_wbcode; objDPArr[6].Value = m_Stor.m_ID; long lngEff = -1; long lngRes = objHRPServ.lngExecuteParameterSQL(strSQL, ref lngEff, objDPArr); return(lngRes); }
public long m_lngGetMedicineTypeVisionm(System.Security.Principal.IPrincipal p_objPrincipal, string p_strmedicinetypeid, out clsMS_MedicineTypeVisionmSet p_objTypeVO) { //p_objTypeVO = null; p_objTypeVO = new clsMS_MedicineTypeVisionmSet(); long lngRes = 0; try { string strSQL = @"select medicinetypeid_vchr, lotno_int, validperiod_int from t_ms_medicinetypevisionmset where medicinetypeid_vchr = ?"; DataTable dtbValue = null; clsHRPTableService objHRPServ = new clsHRPTableService(); IDataParameter[] objDPArr = null; objHRPServ.CreateDatabaseParameter(1, out objDPArr); objDPArr[0].Value = p_strmedicinetypeid; lngRes = objHRPServ.lngGetDataTableWithParameters(strSQL, ref dtbValue, objDPArr); if (dtbValue != null && dtbValue.Rows.Count > 0) { p_objTypeVO.m_intLotno = Convert.ToInt16(dtbValue.Rows[0]["lotno_int"]); p_objTypeVO.m_intValidperiod = Convert.ToInt16(dtbValue.Rows[0]["validperiod_int"]); } else { p_objTypeVO.m_intLotno = 1; p_objTypeVO.m_intValidperiod = 1; } } catch (Exception objEx) { com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public long m_lngGetMedicineSpec(System.Security.Principal.IPrincipal p_objPrincipal, string p_strMedicineID, out string p_strMedicineSpec) { p_strMedicineSpec = string.Empty; long lngRes = 0; try { string strSQL = @"select medspec_vchr from t_bse_medicine where medicineid_chr = ?"; DataTable dtbValue = null; clsHRPTableService objHRPServ = new clsHRPTableService(); IDataParameter[] objDPArr = null; objHRPServ.CreateDatabaseParameter(1, out objDPArr); objDPArr[0].Value = p_strMedicineID; lngRes = objHRPServ.lngGetDataTableWithParameters(strSQL, ref dtbValue, objDPArr); if (lngRes > 0 && dtbValue != null && dtbValue.Rows.Count > 0) { p_strMedicineSpec = dtbValue.Rows[0]["medspec_vchr"].ToString(); } } catch (Exception objEx) { com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public string m_strGetMedicineIDByChargeItemID(string ID) { long lngRes = 0; string strMedID = ""; string SQL = @"select a.itemsrcid_vchr from t_bse_chargeitem a, t_bse_medicine b where a.itemsrcid_vchr = b.medicineid_chr and a.itemid_chr = ?"; try { clsHRPTableService objHRPSvc = new clsHRPTableService(); IDataParameter[] ParamArr = null; objHRPSvc.CreateDatabaseParameter(1, out ParamArr); ParamArr[0].Value = ID; DataTable dt = new DataTable(); lngRes = objHRPSvc.lngGetDataTableWithParameters(SQL, ref dt, ParamArr); if (lngRes > 0 && dt.Rows.Count > 0) { strMedID = dt.Rows[0][0].ToString().Trim(); } objHRPSvc.Dispose(); } catch (Exception objEx) { string strTmp = objEx.Message; com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(strMedID); }
public long m_lngSaverMedicineType(System.Security.Principal.IPrincipal p_objPrincipal, clsMS_MedicineTypeVisionmSet[] objMedicineType) { long lngRes = 0; string strSQL; try { strSQL = @"delete from t_ms_medicinetypevisionmset"; clsHRPTableService objHRPServ = new clsHRPTableService(); objHRPServ.DoExcute(strSQL); if (objMedicineType == null || objMedicineType.Length == 0) { return(1); } strSQL = @"insert into t_ms_medicinetypevisionmset (medicinetypeid_vchr,lotno_int,validperiod_int) values (?,?,?)"; long lngEff = -1; if (clsHRPTableService.bytDatabase_Selector != (byte)clsHRPTableService.enumDatabase_Selector.bytOracle) { IDataParameter[] objLisAddItemRefArr = null; for (int iOr = 0; iOr < objMedicineType.Length; iOr++) { objHRPServ.CreateDatabaseParameter(3, out objLisAddItemRefArr); objLisAddItemRefArr[0].Value = objMedicineType[iOr].m_strMedicineTypeid; objLisAddItemRefArr[1].Value = objMedicineType[iOr].m_intLotno; objLisAddItemRefArr[2].Value = objMedicineType[iOr].m_intValidperiod; lngRes = objHRPServ.lngExecuteParameterSQL(strSQL, ref lngEff, objLisAddItemRefArr);//往表增加记录 } } else { DbType[] dbTypes = new DbType[] { DbType.String, DbType.Int32, DbType.Int32 }; object[][] objValues = new object[3][]; int intItemCount = objMedicineType.Length; for (int j = 0; j < objValues.Length; j++) { objValues[j] = new object[intItemCount];//初始化 } for (int iOr = 0; iOr < intItemCount; iOr++) { objValues[0][iOr] = objMedicineType[iOr].m_strMedicineTypeid; objValues[1][iOr] = objMedicineType[iOr].m_intLotno; objValues[2][iOr] = objMedicineType[iOr].m_intValidperiod; } 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_lngComputationByScope(string p_strScope, out DataTable p_dtResultTable) { long lngRes = -1; p_dtResultTable = new DataTable(); string strSQL = @"select t.scope_chr, t.catid_chr, t.catname_vchr, t.type_int, t.compexp_vchr, t.dispctl_vchr, t.prtclt_vchr, t.status_int from t_bse_defchargecat t where t.scope_chr = ?"; clsHRPTableService objHRPSvc = new clsHRPTableService(); IDataParameter[] ParamArr = null; objHRPSvc.CreateDatabaseParameter(1, out ParamArr); ParamArr[0].Value = p_strScope; try { lngRes = objHRPSvc.lngGetDataTableWithParameters(strSQL, ref p_dtResultTable, ParamArr); objHRPSvc.Dispose(); } catch (Exception objEx) { string strTmp = objEx.Message; com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }