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_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_lngGetBaseMedicine(System.Security.Principal.IPrincipal p_objPrincipal, string p_strAssistCode, string p_strDrugType, out DataTable p_dtbMedicine) { p_dtbMedicine = null; long lngRes = 0; if (p_strAssistCode == null) { p_strAssistCode = string.Empty; } try { string strSQL = @"select t.assistcode_chr, t.medicinename_vchr, t.medspec_vchr, t.opunit_chr, t.ipunit_chr, t.packqty_dec, t.productorid_chr, t.pycode_chr, t.wbcode_chr, t.medicineid_chr, t.ispoison_chr, t.ischlorpromazine2_chr, t.unitprice_mny, t.medicinetypeid_chr, t.tradeprice_mny, t.limitunitprice_mny, t.opchargeflg_int, t.ipchargeflg_int, t.ifstop_int, b.itemname_vchr as aliasname_vchr, b.pycode_vchr as aliaspycode_vchr, b.wbcode_vchr as aliaswbcode_vchr from t_bse_medicine t left join t_bse_chargeitem a on t.medicineid_chr = a.itemsrcid_vchr left join t_bse_itemalias_drug b on a.itemid_chr = b.itemid_chr and b.status_int = 1 and b.flag_int = 1 where t.assistcode_chr like ? and t.medicinetypeid_chr = ? and t.deleted_int=0 order by t.assistcode_chr,t.medicineid_chr"; clsHRPTableService objHRPServ = new clsHRPTableService(); IDataParameter[] objDPArr = null; objHRPServ.CreateDatabaseParameter(2, out objDPArr); objDPArr[0].Value = p_strAssistCode + "%"; objDPArr[1].Value = p_strDrugType; lngRes = objHRPServ.lngGetDataTableWithParameters(strSQL, ref p_dtbMedicine, 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_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_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_lngFind(System.Security.Principal.IPrincipal p_objPrincipal, int p_intSeq, out clsLisQCSamplelotVO p_objQCSamplelot) { long lngRes = 0; p_objQCSamplelot = null; clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService(); lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, m_strCurrentSvcDetailName, "m_lngFind"); if (lngRes <= 0) { return(-1); } com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); try { System.Data.IDataParameter[] objODPArr = clsPublicSvc.m_objConstructIDataParameterArr(p_intSeq); DataTable dtbResult = null; lngRes = 0; lngRes = objHRPSvc.lngGetDataTableWithParameters(m_strFindSql, ref dtbResult, objODPArr); objHRPSvc.Dispose(); if (lngRes == 1 && dtbResult != null && dtbResult.Rows.Count > 0) { p_objQCSamplelot = new clsLisQCSamplelotVO(); this.ConstructVO(dtbResult.Rows[0], ref p_objQCSamplelot); } } catch (Exception objEx) { string strTmp = objEx.Message; com.digitalwave.Utility.clsLogText objLogger = new 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 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_lngGetSysParm(System.Security.Principal.IPrincipal p_objPrincipal, string p_strCode, out string p_strParm) { p_strParm = string.Empty; long lngRes = 0; try { string strSQL = @"select parmvalue_vchr from t_bse_sysparm where parmcode_chr = ? and status_int = 1"; clsHRPTableService objHRPServ = new clsHRPTableService(); IDataParameter[] objDPArr = null; objHRPServ.CreateDatabaseParameter(1, out objDPArr); objDPArr[0].Value = p_strCode; DataTable dtbValue = null; lngRes = objHRPServ.lngGetDataTableWithParameters(strSQL, ref dtbValue, objDPArr); if (dtbValue != null && dtbValue.Rows.Count > 0) { p_strParm = 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_lngGetStoragePack(System.Security.Principal.IPrincipal p_objPrincipal, string p_strStorageID, int p_intType, out DataTable p_dtbDate) { p_dtbDate = null; long lngRes = 0; try { string strSQL = @"select storagerackid_chr, storagerackcode_vchr, storagerackname_vchr, pycode_chr, wbcode_chr from t_ms_storagerackset where storageid_chr = ? and typeid_int = ? order by storagerackcode_vchr"; clsHRPTableService objHRPServ = new clsHRPTableService(); IDataParameter[] objDPArr = null; objHRPServ.CreateDatabaseParameter(2, out objDPArr); objDPArr[0].Value = p_strStorageID; objDPArr[1].Value = p_intType; lngRes = objHRPServ.lngGetDataTableWithParameters(strSQL, ref p_dtbDate, objDPArr); } catch (Exception objEx) { com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public long m_lngGetStoreRoomName(System.Security.Principal.IPrincipal p_objPrincipal, string p_strStoreRoomID, out string p_strStoreRoomName) { p_strStoreRoomName = string.Empty; long lngRes = 0; try { string strSQL = @"select distinct t.medicineroomid, t.medicineroomname from t_ms_medicinestoreroomset t where t.medicineroomid = ?"; DataTable dtbValue = null; clsHRPTableService objHRPServ = new clsHRPTableService(); IDataParameter[] objDPArr = null; objHRPServ.CreateDatabaseParameter(1, out objDPArr); objDPArr[0].Value = p_strStoreRoomID; lngRes = objHRPServ.lngGetDataTableWithParameters(strSQL, ref dtbValue, objDPArr); if (lngRes > 0 && dtbValue != null && dtbValue.Rows.Count > 0) { p_strStoreRoomName = dtbValue.Rows[0]["medicineroomname"].ToString(); } } catch (Exception objEx) { com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public long m_lngGetSysSetting(System.Security.Principal.IPrincipal p_objPrincipal, string p_strSetID, out int p_intSet) { p_intSet = 0; if (p_strSetID == null) { return(-1); } long lngRes = 0; try { string strSQL = @"select setstatus_int from t_sys_setting where setid_chr = ?"; DataTable dtbValue = null; clsHRPTableService objHRPServ = new clsHRPTableService(); IDataParameter[] objDPArr = null; objHRPServ.CreateDatabaseParameter(1, out objDPArr); objDPArr[0].Value = p_strSetID; lngRes = objHRPServ.lngGetDataTableWithParameters(strSQL, ref dtbValue, objDPArr); if (lngRes > 0 && dtbValue != null && dtbValue.Rows.Count > 0) { p_intSet = Convert.ToInt32(dtbValue.Rows[0][0]); } } catch (Exception objEx) { com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public long m_lngGetDeptIDForStorage(System.Security.Principal.IPrincipal p_objPrincipal, string p_intStorageID, out string p_strDeptID) { p_strDeptID = string.Empty; long lngRes = 0; DataTable dtbValue = new DataTable(); string strSQL = @"select a.deptid_chr from t_ms_medicinestoreroomset a where a.medicineroomid = ? "; try { clsHRPTableService objHRPServ = new clsHRPTableService(); System.Data.IDataParameter[] objParm = null; objHRPServ.CreateDatabaseParameter(1, out objParm); objParm[0].Value = p_intStorageID; lngRes = objHRPServ.lngGetDataTableWithParameters(strSQL, ref dtbValue, objParm); objHRPServ.Dispose(); objHRPServ = null; if (dtbValue != null && dtbValue.Rows.Count > 0) { p_strDeptID = Convert.ToString(dtbValue.Rows[0]["deptid_chr"]); } dtbValue = null; } catch (Exception objEx) { com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public long m_lngGetRetailPrice(System.Security.Principal.IPrincipal p_objPrincipal, string p_strMedicineID, out decimal p_dcmPrice) { p_dcmPrice = 0; long lngRes = 0; try { string strSQL = @"select a.unitprice_mny from t_bse_medicine a where a.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); objHRPServ.Dispose(); objHRPServ = null; if (lngRes > 0 && dtbValue != null && dtbValue.Rows.Count > 0) { decimal.TryParse(dtbValue.Rows[0]["unitprice_mny"].ToString(), out p_dcmPrice); } } catch (Exception objEx) { com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public long m_lngGetItemID(string p_strMedicineID, out string p_strItemID) { p_strItemID = string.Empty; long lngRes = -1; DataTable p_dtbTemp = null; string strSQL = @"select a.itemid_chr from t_bse_chargeitem a where a.itemsrcid_vchr = ?"; try { clsHRPTableService objHRPSvc = new clsHRPTableService(); IDataParameter[] ParamArr = null; objHRPSvc.CreateDatabaseParameter(1, out ParamArr); ParamArr[0].Value = p_strMedicineID; lngRes = objHRPSvc.lngGetDataTableWithParameters(strSQL, ref p_dtbTemp, ParamArr); if (p_dtbTemp != null && p_dtbTemp.Rows.Count > 0) { p_strItemID = p_dtbTemp.Rows[0][0].ToString(); } objHRPSvc.Dispose(); } catch (Exception objEx) { string strTmp = objEx.Message; com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.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_lngGetSystemSetting(out int setResult, string setId) { long lngRes = 0; setResult = -1; clsHRPTableService objHRPSvc = new clsHRPTableService(); string sql = @"select setstatus_int from t_sys_setting where setid_chr=?"; IDataParameter[] arrParams = clsPublicSvc.m_objConstructIDataParameterArr(setId); DataTable dt = new DataTable(); try { lngRes = objHRPSvc.lngGetDataTableWithParameters(sql, ref dt, arrParams); } catch (Exception objEx) { new clsLogText().LogError(objEx.Message); } if (dt != null && dt.Rows.Count > 0) { try { setResult = int.Parse(dt.Rows[0]["setstatus_int"].ToString()); } catch { setResult = -1; new clsLogText().LogError("系统设置(" + setId.ToString() + ")错误!"); } } return(lngRes); }
public long m_lngGetAccount(System.Security.Principal.IPrincipal p_objPrincipal, string p_strStorageID, DateTime p_dtmQueryDate, out string p_strQueryAccount) { p_strQueryAccount = string.Empty; long lngRes = 0; try { string strSQL = @"select max(accountid_chr) accountid_chr from t_ms_accountperiod where storageid_chr = ? and endtime_dat <= ?"; DataTable dtbValue = null; clsHRPTableService objHRPServ = new clsHRPTableService(); IDataParameter[] objDPArr = null; objHRPServ.CreateDatabaseParameter(2, out objDPArr); objDPArr[0].Value = p_strStorageID; objDPArr[1].Value = p_dtmQueryDate; lngRes = objHRPServ.lngGetDataTableWithParameters(strSQL, ref dtbValue, objDPArr); if (lngRes > 0 && dtbValue != null && dtbValue.Rows.Count > 0) { p_strQueryAccount = dtbValue.Rows[0]["accountid_chr"].ToString(); } } catch (Exception objEx) { com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public long m_lngFind(System.Security.Principal.IPrincipal p_objPrincipal, int p_intSeq, out clsLisQCDataVO p_objQCData) { long lngRes = 0; p_objQCData = null; clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService(); lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.LIS.clsTmdQCBatchConcentrationSvc", "m_lngFind"); if (lngRes <= 0) { return(-1); } com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); try { System.Data.IDataParameter[] objODPArr = clsPublicSvc.m_objConstructIDataParameterArr(p_intSeq); DataTable dtbResult = null; lngRes = 0; lngRes = objHRPSvc.lngGetDataTableWithParameters(m_strFindSql, ref dtbResult, objODPArr); objHRPSvc.Dispose(); if (lngRes == 1 && dtbResult != null && dtbResult.Rows.Count > 0) { p_objQCData = new clsLisQCDataVO(); this.ConstructVO(dtbResult.Rows[0], ref p_objQCData); } } catch (Exception objEx) { new clsLogText().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 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); }
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_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 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_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 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); }
// public DateTime m_dtmGetServerDate() // { // long lngRes = 0; // System.DateTime datResult = System.DateTime.Now; // string strSQL = @"select sysdate // from dual"; // System.Data.DataTable dtbResult = new System.Data.DataTable(); // try // { // com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); // lngRes = objHRPSvc.lngGetDataTableWithParameters(strSQL, ref dtbResult); // if (lngRes > 0 && dtbResult != null) // { // datResult = System.DateTime.Parse(dtbResult.Rows[0]["sysdate"].ToString()); // } // objHRPSvc.Dispose(); // } // catch (Exception objEx) // { // string strTmp = objEx.Message; // com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText(); // bool blnRes = objLogger.LogError(objEx); // } // return datResult; // } public string m_dtmGetServerDate() { long lngRes = 0; //System.DateTime datResult = System.DateTime.Now; string datResult = ""; string strSQL = @"select sysdate from dual"; System.Data.DataTable dtbResult = new System.Data.DataTable(); try { com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); lngRes = objHRPSvc.lngGetDataTableWithParameters(strSQL, ref dtbResult); if (lngRes > 0 && dtbResult != null) { datResult = dtbResult.Rows[0]["sysdate"].ToString(); } objHRPSvc.Dispose(); } catch (Exception objEx) { string strTmp = objEx.Message; com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(datResult); }
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 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_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); }