示例#1
0
        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);
        }
示例#2
0
        /// <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);
        }
示例#3
0
        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);
        }
示例#5
0
        public long m_lngUpdateOrderBeginDate(clsBIHOrder[] m_arrOrder)
        {
            long lngRes = 0;

            com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();
            string strSQL = "";

            ArrayList OrderATTACHList = new ArrayList();

            try
            {
                int n = 0;

                strSQL = @"
                    update t_opr_bih_order                  
                        set   
                        PostDate_Dat=?,
                        STARTDATE_DAT=?
                        where
                        STATUS_INT in (0,1,5,7) and
                        REGISTERID_CHR=? and RECIPENO_INT=?
                    ";
                //m_lngUpdateOrderBooking(m_arrOrderBooking[i]);
                DbType[] dbTypes = new DbType[] {
                    DbType.Date, DbType.Date, DbType.String, DbType.Int32
                };
                object[][] objValues = new object[4][];
                if (m_arrOrder.Length > 0)
                {
                    for (int j = 0; j < objValues.Length; j++)
                    {
                        objValues[j] = new object[m_arrOrder.Length];//初始化
                    }

                    for (int k1 = 0; k1 < m_arrOrder.Length; k1++)
                    {
                        n = -1;

                        objValues[++n][k1] = m_arrOrder[k1].m_dtPostdate;
                        objValues[++n][k1] = m_arrOrder[k1].m_dtPostdate;
                        objValues[++n][k1] = m_arrOrder[k1].m_strRegisterID;
                        objValues[++n][k1] = m_arrOrder[k1].m_intRecipenNo;
                    }
                    lngRes = objHRPSvc.m_lngSaveArrayWithParameters(strSQL, objValues, dbTypes);
                }
            }
            catch (Exception objEx)
            {
                string strTmp = objEx.Message;
                com.digitalwave.Utility.clsLogText objLogger = new clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
示例#6
0
        public long m_lngUpdateByArr(System.Security.Principal.IPrincipal p_objPrincipal, clsLisQCDataVO[] p_objQCDataArr)
        {
            long lngRes = 0;

            if (p_objQCDataArr == null || p_objQCDataArr.Length <= 0)
            {
                return(lngRes);
            }

            clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService();

            lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, m_strCurrentSvcDetailName, "m_lngUpdateByArr");
            if (lngRes <= 0)
            {
                return(-1);
            }

            try
            {
                int iCount = p_objQCDataArr.Length;

                DbType[] m_dbType = new DbType[] { DbType.Int32, DbType.Double, DbType.Int32, DbType.DateTime, DbType.Int32 };

                object[][] objValues = new object[m_dbType.Length][];
                for (int i = 0; i < objValues.Length; i++)
                {
                    objValues[i] = new object[iCount];
                }
                clsLisQCDataVO objTemp = null;
                for (int iRow = 0; iRow < iCount; iRow++)
                {
                    objTemp = p_objQCDataArr[iRow];

                    objValues[0][iRow] = objTemp.m_intQCBatchSeq;
                    objValues[1][iRow] = objTemp.m_dlbResult;
                    objValues[2][iRow] = objTemp.m_intConcentrationSeq;
                    objValues[3][iRow] = objTemp.m_datQCDate;
                    objValues[4][iRow] = objTemp.m_intSeq;
                }
                clsHRPTableService objHRPServ = new clsHRPTableService();
                lngRes = objHRPServ.m_lngSaveArrayWithParameters(m_strUpdateSql, objValues, m_dbType);
            }
            catch (Exception objEx)
            {
                new clsLogText().LogDetailError(objEx, true);
            }
            finally
            {
                p_objQCDataArr = null;
            }
            return(lngRes);
        }
示例#7
0
        public long m_lngAddNewMedStoreSetInfo(System.Security.Principal.IPrincipal p_objPrincipal, ref clsMS_MedicineStoreroom_VO p_objMedicineStoreroom)
        {
            if (p_objMedicineStoreroom == null)
            {
                return(-1);
            }

            long lngRes = 0;

            try
            {
                string strSQL = @"   insert into t_ds_medstoreset
  (medstoreid, medstorename, medicinetypeid_chr)
values
  (?, ?, ?)";

                clsHRPTableService objHRPServ = new clsHRPTableService();

                DbType[] dbTypes = new DbType[] { DbType.String, DbType.String, DbType.String };

                object[][] objValues = new object[3][];

                int intItemCount = p_objMedicineStoreroom.m_strMedicineTypeID_CHR.Length;
                for (int j = 0; j < objValues.Length; j++)
                {
                    objValues[j] = new object[intItemCount];//初始化
                }
                for (int i = 0; i < intItemCount; i++)
                {
                    objValues[0][i] = p_objMedicineStoreroom.m_strMedicineRoomID_VCHR;
                    objValues[1][i] = p_objMedicineStoreroom.m_strMedicineRoomName_VCHR;
                    objValues[2][i] = p_objMedicineStoreroom.m_strMedicineTypeID_CHR[i];
                }
                lngRes = objHRPServ.m_lngSaveArrayWithParameters(strSQL, objValues, dbTypes);
                objHRPServ.Dispose();
                objHRPServ = null;
            }
            catch (Exception objEx)
            {
                com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
示例#8
0
        public long m_lngUpdateCheckNUM(clsLisApplMainVO[] p_objMainArr, string p_strOperator)
        {
            long               lngRes    = 0;
            string             strSQL    = null;
            clsHRPTableService objHRPSvc = null;

            DbType[]   dbType   = new DbType[] { DbType.String, DbType.String, DbType.String };
            object[][] objValue = new object[3][];
            for (int i = 0; i < objValue.Length; i++)
            {
                objValue[i] = new object[p_objMainArr.Length];
            }
            try
            {
                strSQL = @"update t_opr_lis_application a
   set a.application_form_no_chr = ?,
       a.modify_dat              = sysdate,
       a.operator_id_chr         = ?
 where a.application_id_chr = ?
   and a.pstatus_int = 2
";
                for (int i = 0; i < p_objMainArr.Length; i++)
                {
                    objValue[0][i] = p_objMainArr[i].m_strApplication_Form_NO;
                    objValue[1][i] = p_strOperator;
                    objValue[2][i] = p_objMainArr[i].m_strAPPLICATION_ID;
                }
                objHRPSvc = new clsHRPTableService();
                lngRes    = objHRPSvc.m_lngSaveArrayWithParameters(strSQL, objValue, dbType);
            }
            catch (Exception objEx)
            {
                clsLogText objLogger = new clsLogText();
                objLogger.LogDetailError(objEx, true);
            }
            finally
            {
                objValue = null;
                objHRPSvc.Dispose();
                objHRPSvc = null;
            }
            return(lngRes);
        }
示例#9
0
        public long m_lngSaveStorageRack(System.Security.Principal.IPrincipal p_objPrincipal, Dictionary <string, string> p_dicStorageRack)
        {
            long lngRes = 0;

            try
            {
                string strSQL = @"update t_ds_storage_detail a set a.storagerackid_chr = ?
                                    where a.medicineid_chr = ? and a.lotno_vchr = ?";

                clsHRPTableService objHRPServ = new clsHRPTableService();
                DbType[]           dbTypes    = new DbType[] { DbType.String, DbType.String, DbType.String };

                object[][] objValues = new object[3][];

                int intItemCount = p_dicStorageRack.Count;
                for (int j = 0; j < objValues.Length; j++)
                {
                    objValues[j] = new object[intItemCount];//初始化
                }

                int iRow = 0;
                foreach (KeyValuePair <string, string> kvp in p_dicStorageRack)
                {
                    objValues[0][iRow] = kvp.Value;
                    objValues[1][iRow] = kvp.Key.Substring(0, 10);
                    objValues[2][iRow] = kvp.Key.Substring(10);
                    iRow++;
                }

                lngRes = objHRPServ.m_lngSaveArrayWithParameters(strSQL, objValues, dbTypes);
                objHRPServ.Dispose();
                objHRPServ = null;
            }
            catch (Exception objEx)
            {
                com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
示例#10
0
        public long m_lngSaveStorageSet(System.Security.Principal.IPrincipal p_objPrincipal, DataTable p_dtbModify)
        {
            long lngRes = 0;

            try
            {
                string strSQL = @"update t_ds_storage a
	 set a.noqtyflag_int = ?,a.ifstop_int = ?,a.storagerackid_chr = ?
 where a.seriesid_int = ?";

                clsHRPTableService objHRPServ = new clsHRPTableService();
                DbType[]           dbTypes    = new DbType[] { DbType.Int16, DbType.Int16, DbType.String, DbType.Int64 };

                object[][] objValues = new object[4][];

                int intItemCount = p_dtbModify.Rows.Count;
                for (int j = 0; j < objValues.Length; j++)
                {
                    objValues[j] = new object[intItemCount];//初始化
                }

                for (int i1 = 0; i1 < p_dtbModify.Rows.Count; i1++)
                {
                    objValues[0][i1] = Convert.ToInt16(p_dtbModify.Rows[i1]["noqtyflag_int"].ToString());
                    objValues[1][i1] = Convert.ToInt16(p_dtbModify.Rows[i1]["ifstop_int"].ToString());
                    objValues[2][i1] = Convert.ToString(p_dtbModify.Rows[i1]["storagerackid_chr"]);
                    objValues[3][i1] = Convert.ToInt64(p_dtbModify.Rows[i1]["seriesid_int"]);
                }

                lngRes = objHRPServ.m_lngSaveArrayWithParameters(strSQL, objValues, dbTypes);
                objHRPServ.Dispose();
                objHRPServ = null;
            }
            catch (Exception objEx)
            {
                com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
示例#11
0
        public long m_lngSaveData(System.Security.Principal.IPrincipal p_objPrincipal, string p_strStoreid, clsOutOrInStorageDeptSet[] p_objDeptArr)
        {
            long   lngRes = 0;
            string strSQL;

            try
            {
                //if (p_objDeptArr == null || p_objDeptArr.Length == 0)
                //{
                //    return lngRes;
                //}
                long lngdelEff = -1;
                strSQL = @"delete from t_aid_outindeptrelation where outstoragedept_chr=?";
                clsHRPTableService objHRPServ = new clsHRPTableService();
                IDataParameter[]   objDPArr   = null;
                objHRPServ.CreateDatabaseParameter(1, out objDPArr);
                objDPArr[0].Value = p_strStoreid;
                lngRes            = objHRPServ.lngExecuteParameterSQL(strSQL, ref lngdelEff, objDPArr);
                if (p_objDeptArr.Length == 0)
                {
                    objHRPServ.Dispose();
                    objHRPServ = null;
                    return(lngRes);
                }

                strSQL = @"insert into t_aid_outindeptrelation(outstoragedept_chr,instoragedept_chr,orderno_int) values(?,?,?)";

                long lngEff = -1;
                if (clsHRPTableService.bytDatabase_Selector != (byte)clsHRPTableService.enumDatabase_Selector.bytOracle)
                {
                    IDataParameter[] objLisAddItemRefArr = null;
                    for (int iOr = 0; iOr < p_objDeptArr.Length; iOr++)
                    {
                        objHRPServ.CreateDatabaseParameter(3, out objLisAddItemRefArr);
                        objLisAddItemRefArr[0].Value = p_strStoreid;
                        objLisAddItemRefArr[1].Value = p_objDeptArr[iOr].strDeptid;
                        objLisAddItemRefArr[2].Value = iOr + 1;

                        lngRes = objHRPServ.lngExecuteParameterSQL(strSQL, ref lngEff, objLisAddItemRefArr);//往表增加记录
                    }
                }
                else
                {
                    DbType[] dbTypes = new DbType[] { DbType.String, DbType.String, DbType.String };

                    object[][] objValues = new object[3][];

                    int intItemCount = p_objDeptArr.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_strStoreid;
                        objValues[1][iOr] = p_objDeptArr[iOr].strDeptid;
                        objValues[2][iOr] = iOr + 1;
                    }

                    lngRes = objHRPServ.m_lngSaveArrayWithParameters(strSQL, objValues, dbTypes);
                }

                objHRPServ.Dispose();
                objHRPServ = null;
            }
            catch (Exception objEx)
            {
                com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
示例#12
0
        public long m_lngSaverExportdept(System.Security.Principal.IPrincipal p_objPrincipal, clsMS_ExportDept[] p_objExportDeptArr)
        {
            long   lngRes = 0;
            string strSQL;

            try
            {
                strSQL = @"delete from t_ms_exportdept";
                clsHRPTableService objHRPServ = new clsHRPTableService();
                objHRPServ.DoExcute(strSQL);

                if (p_objExportDeptArr == null || p_objExportDeptArr.Length == 0)
                {
                    return(1);
                }

                strSQL = @"insert into t_ms_exportdept (seriesid_int,exportdept_chr,storageflag_int) values (?,?,?)";

                long lngEff = -1;
                if (clsHRPTableService.bytDatabase_Selector != (byte)clsHRPTableService.enumDatabase_Selector.bytOracle)
                {
                    IDataParameter[] objLisAddItemRefArr = null;
                    for (int iOr = 0; iOr < p_objExportDeptArr.Length; iOr++)
                    {
                        objHRPServ.CreateDatabaseParameter(3, out objLisAddItemRefArr);
                        objLisAddItemRefArr[0].Value = p_objExportDeptArr[iOr].m_strSeriesID;
                        objLisAddItemRefArr[1].Value = p_objExportDeptArr[iOr].m_strExportDept;
                        objLisAddItemRefArr[2].Value = p_objExportDeptArr[iOr].m_strFlag;

                        lngRes = objHRPServ.lngExecuteParameterSQL(strSQL, ref lngEff, objLisAddItemRefArr);//往表增加记录
                    }
                }
                else
                {
                    DbType[] dbTypes = new DbType[] { DbType.String, DbType.String, DbType.String };

                    object[][] objValues = new object[3][];

                    int intItemCount = p_objExportDeptArr.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_objExportDeptArr[iOr].m_strSeriesID;
                        objValues[1][iOr] = p_objExportDeptArr[iOr].m_strExportDept;
                        objValues[2][iOr] = p_objExportDeptArr[iOr].m_strFlag;
                    }

                    lngRes = objHRPServ.m_lngSaveArrayWithParameters(strSQL, objValues, dbTypes);
                }
                objHRPServ.Dispose();
                objHRPServ = null;
            }
            catch (Exception objEx)
            {
                com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
示例#13
0
        public long m_lngAddNewMedicineStoreInfo(System.Security.Principal.IPrincipal p_objPrincipal, ref clsMS_MedicineStoreroom_VO p_objMedicineStoreroom)
        {
            if (p_objMedicineStoreroom == null)
            {
                return(-1);
            }

            long lngRes = 0;

            try
            {
                string strGetMax = @"select max(medicineroomid) maxid from t_ms_medicinestoreroomset";
                //2008.5.14 wuchongkun+shortname_chr
                string strSQL = @"insert into t_ms_medicinestoreroomset
  (medicineroomid, medicineroomname, medicinetypeid_chr,deptid_chr,shortname_chr)
values
  (?, ?, ?,?,?)";

                clsHRPTableService objHRPServ = new clsHRPTableService();
                long lngEff = -1;

                if (string.IsNullOrEmpty(p_objMedicineStoreroom.m_strMedicineRoomID_VCHR))
                {
                    DataTable dtbValue = null;
                    lngRes = objHRPServ.lngGetDataTableWithoutParameters(strGetMax, ref dtbValue);
                    if (dtbValue == null || dtbValue.Rows.Count == 0)
                    {
                        p_objMedicineStoreroom.m_strMedicineRoomID_VCHR = "0001";
                    }
                    else
                    {
                        if (dtbValue.Rows[0][0] == DBNull.Value)
                        {
                            p_objMedicineStoreroom.m_strMedicineRoomID_VCHR = "0001";
                        }
                        else
                        {
                            p_objMedicineStoreroom.m_strMedicineRoomID_VCHR = (Convert.ToInt32(dtbValue.Rows[0][0]) + 1).ToString("0000");
                        }
                    }
                }

                if (clsHRPTableService.bytDatabase_Selector != (byte)clsHRPTableService.enumDatabase_Selector.bytOracle)
                {
                    IDataParameter[] objDPArr = null;

                    for (int i = 0; i < p_objMedicineStoreroom.m_strMedicineTypeID_CHR.Length; i++)
                    {
                        objHRPServ.CreateDatabaseParameter(5, out objDPArr);
                        objDPArr[0].Value = p_objMedicineStoreroom.m_strMedicineRoomID_VCHR;
                        objDPArr[1].Value = p_objMedicineStoreroom.m_strMedicineRoomName_VCHR;
                        objDPArr[2].Value = p_objMedicineStoreroom.m_strMedicineTypeID_CHR[i];
                        objDPArr[3].Value = p_objMedicineStoreroom.m_strDEPTID_CHR;
                        //+m_strMidicineRommShortName_chr 2008.5.14 wuchongkun
                        objDPArr[4].Value = p_objMedicineStoreroom.m_strMidicineRommShortName_CHR;
                        lngRes            = objHRPServ.lngExecuteParameterSQL(strSQL, ref lngEff, objDPArr);
                    }
                }
                else
                {
                    DbType[] dbTypes = new DbType[] { DbType.String, DbType.String, DbType.String, DbType.String, DbType.String };

                    object[][] objValues = new object[5][];

                    int intItemCount = p_objMedicineStoreroom.m_strMedicineTypeID_CHR.Length;
                    for (int j = 0; j < objValues.Length; j++)
                    {
                        objValues[j] = new object[intItemCount];//初始化
                    }

                    for (int i = 0; i < intItemCount; i++)
                    {
                        objValues[0][i] = p_objMedicineStoreroom.m_strMedicineRoomID_VCHR;
                        objValues[1][i] = p_objMedicineStoreroom.m_strMedicineRoomName_VCHR;
                        objValues[2][i] = p_objMedicineStoreroom.m_strMedicineTypeID_CHR[i];
                        objValues[3][i] = p_objMedicineStoreroom.m_strDEPTID_CHR;
                        //+ wuchongkun.2008.5.14
                        objValues[4][i] = p_objMedicineStoreroom.m_strMidicineRommShortName_CHR;
                    }
                    lngRes = objHRPServ.m_lngSaveArrayWithParameters(strSQL, objValues, dbTypes);
                }
                objHRPServ.Dispose();
                objHRPServ = null;
            }
            catch (Exception objEx)
            {
                com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
示例#14
0
        public long m_lngUpdateOrderATTACHTIMES(clsBIHOrder[] m_arrOrder)
        {
            long      lngRes          = 0;
            ArrayList OrderATTACHList = new ArrayList();

            for (int k = 0; k < m_arrOrder.Length; k++)
            {
                if (m_arrOrder[k].m_intStatus != 0)
                {
                    OrderATTACHList.Add(m_arrOrder[k].m_strOrderID);
                }
            }
            if (OrderATTACHList.Count > 0)
            {
                int[]     intType  = new int[] { 0, 1 };
                ArrayList TypeList = new ArrayList(intType);
                bool      blnExist = false;
                lngRes = this.m_lngCheckOrderStatus(OrderATTACHList, TypeList, ref blnExist);
                if (lngRes < 0 || blnExist == false)
                {
                    return(-10);
                }
            }
            com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();
            string strSQL = "";

            try
            {
                int n = 0;

                strSQL = @"
                     update t_opr_bih_order                  
                        set   
                        ATTACHTIMES_INT=?
                        where
                        REGISTERID_CHR=?
                        and RECIPENO_INT=?
                    ";
                //m_lngUpdateOrderBooking(m_arrOrderBooking[i]);
                DbType[] dbTypes = new DbType[] {
                    DbType.Int32, DbType.String, DbType.Int32
                };
                object[][] objValues = new object[3][];
                if (m_arrOrder.Length > 0)
                {
                    for (int j = 0; j < objValues.Length; j++)
                    {
                        objValues[j] = new object[m_arrOrder.Length];//初始化
                    }

                    for (int k1 = 0; k1 < m_arrOrder.Length; k1++)
                    {
                        n = -1;

                        objValues[++n][k1] = m_arrOrder[k1].m_intATTACHTIMES_INT;
                        objValues[++n][k1] = m_arrOrder[k1].m_strRegisterID;
                        objValues[++n][k1] = m_arrOrder[k1].m_intRecipenNo;
                    }
                    lngRes = objHRPSvc.m_lngSaveArrayWithParameters(strSQL, objValues, dbTypes);
                }
            }
            catch (Exception objEx)
            {
                string strTmp = objEx.Message;
                com.digitalwave.Utility.clsLogText objLogger = new clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
示例#15
0
        public long lngInsertReport(System.Security.Principal.IPrincipal p_objPrincipal, int instrumentFlag, System.Collections.Generic.List <clsMBY2010VO> objResultArr, DateTime datReportDate)
        {
            long lngRes = 0;
            clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService();

            lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.LIS.clsMBY2010Svc", "lngInsertReport");
            if (lngRes < 0)
            {
                return(-1);
            }
            lngRes = 0;
            clsCheckResult_VO[] objCheckResultVO = null;
            List <string>       strSampleIDArr   = null;
            string strOriginDate = datReportDate.ToString();    //优化查询用

            //构造VO
            this.m_mthContructResultVO(instrumentFlag, objResultArr, out objCheckResultVO, out strSampleIDArr, ref strOriginDate);

            if (strSampleIDArr.Count > 0)
            {
                clsAdvis2120Svc obj = new clsAdvis2120Svc();
                obj.m_lngAddCheckResultList(strSampleIDArr, strOriginDate);
            }

            if (objCheckResultVO == null || objCheckResultVO.Length == 0)
            {
                return(lngRes);
            }

            #region 批量插入
            string SQL = @"insert into t_opr_lis_check_result(modify_dat, 
													   groupid_chr, 
													   check_item_id_chr, 
												       sample_id_chr, 
													   result_vchr, 
													   unit_vchr, 
													   deviceid_chr, 
													   device_check_item_name_vchr, 
													   refrange_vchr, 
													   check_item_name_vchr, 
													   check_item_english_name_vchr, 
													   min_val_dec, 
													   max_val_dec, 
													   abnormal_flag_chr, 
													   check_dat, 
													   clinicapp_vchr, 
													   memo_vchr, 
													   confirm_dat, 
													   pointliststr_vchr, 
													   summary_vchr, 
													   graph_img, 
													   status_int, 
													   checker1_chr, 
													   checker2_chr, 
													   confirm_person_chr, 
													   operator_id_chr, 
													   check_deptid_chr, 
													   graph_format_name_vchr, 
													   is_graph_result_num)
						                       values (?, ?, ?, ?,
                                                       ?, ?, ?,
                                                       ?, ?,
                                                       ?, ?, ?,
                                                       ?, ?, ?, ?,
                                                       ?, ?, ?, ?,
                                                       ?, ?, ?, ?,
                                                       ?, ?, ?,
                                                       ?, ?
                                                      )";
            try
            {
                clsHRPTableService objHRPSvc = new clsHRPTableService();

                DbType[] dbTypes = new DbType[] { DbType.Date, DbType.String, DbType.String, DbType.String, DbType.String, DbType.String, DbType.String, DbType.String, DbType.String, DbType.String, DbType.String, DbType.Decimal, DbType.Decimal, DbType.String, DbType.Date, DbType.String, DbType.String, DbType.Date, DbType.String, DbType.String, DbType.Binary, DbType.Int16, DbType.String, DbType.String, DbType.String, DbType.String, DbType.String, DbType.String, DbType.Int16 };

                object[][] objValues = new object[29][];

                for (int i = 0; i < objValues.Length; i++)
                {
                    objValues[i] = new object[objCheckResultVO.Length];
                }

                for (int i = 0; i < objCheckResultVO.Length; i++)
                {
                    if (objCheckResultVO[i] == null)
                    {
                        return(2);
                    }
                    int n = 0;

                    objValues[n++][i] = Convert.ToDateTime(objCheckResultVO[i].m_strModify_Dat);
                    objValues[n++][i] = objCheckResultVO[i].m_strGroupID;
                    objValues[n++][i] = objCheckResultVO[i].m_strCheck_Item_ID;
                    objValues[n++][i] = objCheckResultVO[i].m_strSample_ID;
                    objValues[n++][i] = objCheckResultVO[i].m_strResult;
                    objValues[n++][i] = objCheckResultVO[i].m_strUnit;
                    objValues[n++][i] = objCheckResultVO[i].m_strDeviceID;
                    objValues[n++][i] = objCheckResultVO[i].m_strDevice_Check_Item_Name;
                    objValues[n++][i] = objCheckResultVO[i].m_strRefrange;
                    objValues[n++][i] = objCheckResultVO[i].m_strCheck_Item_Name;
                    objValues[n++][i] = objCheckResultVO[i].m_strCheck_Item_English_Name;
                    objValues[n++][i] = objCheckResultVO[i].m_strMin_Val;
                    objValues[n++][i] = objCheckResultVO[i].m_strMax_Val;
                    objValues[n++][i] = objCheckResultVO[i].m_strAbnormal_Flag;
                    if (objCheckResultVO[i].m_strCheck_Dat == null || objCheckResultVO[i].m_strCheck_Dat.Trim() == "")
                    {
                        objValues[n++][i] = System.DBNull.Value;
                    }
                    else
                    {
                        objValues[n++][i] = System.DateTime.Parse(objCheckResultVO[i].m_strCheck_Dat);
                    }
                    objValues[n++][i] = objCheckResultVO[i].m_strClinicApp;
                    objValues[n++][i] = objCheckResultVO[i].m_strMemo;
                    if (objCheckResultVO[i].m_strConfirm_Dat == null || objCheckResultVO[i].m_strConfirm_Dat.Trim() == "")
                    {
                        objValues[n++][i] = System.DBNull.Value;
                    }
                    else
                    {
                        objValues[n++][i] = System.DateTime.Parse(objCheckResultVO[i].m_strConfirm_Dat);
                    }
                    objValues[n++][i] = objCheckResultVO[i].m_strPointliststr;
                    objValues[n++][i] = objCheckResultVO[i].m_strSummary;
                    objValues[n++][i] = objCheckResultVO[i].m_byaGraph;
                    objValues[n++][i] = objCheckResultVO[i].m_intStatus;
                    objValues[n++][i] = objCheckResultVO[i].m_strChecker1;
                    objValues[n++][i] = objCheckResultVO[i].m_strChecker2;
                    objValues[n++][i] = objCheckResultVO[i].m_strConfirm_Person;
                    objValues[n++][i] = objCheckResultVO[i].m_strOperator_ID;
                    objValues[n++][i] = objCheckResultVO[i].m_strCheck_DeptID;
                    objValues[n++][i] = objCheckResultVO[i].strGraphFormatName;
                    objValues[n++][i] = objCheckResultVO[i].intIsGraphResult;
                }

                lngRes = objHRPSvc.m_lngSaveArrayWithParameters(SQL, objValues, dbTypes);
                objHRPSvc.Dispose();
            }
            catch (Exception objEx)
            {
                string strTmp = objEx.Message;
                com.digitalwave.Utility.clsLogText objLogger = new clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }

            #endregion

            return(lngRes);
        }
示例#16
0
        public long m_lngAddNewMedicneTypeSet(System.Security.Principal.IPrincipal p_objPrincipal, clsMS_MedicineTypeSetVO p_objTypeVO)
        {
            if (p_objTypeVO == null || p_objTypeVO.m_strMedicineTypeIDArr == null)
            {
                return(-1);
            }

            long lngRes = 0;

            try
            {
                string strSQL = @"insert into t_ms_medicinetypeset
  (medicinetypesetid, medicinetypesetname, medicinetypeid_chr)
values
  (?, ?, ?)";

                string strGetMax = @"select max(medicinetypesetid)
  from t_ms_medicinetypeset";

                clsHRPTableService objHRPServ = new clsHRPTableService();
                long lngEff = -1;

                if (p_objTypeVO.m_intMedicineTypeSetID <= 0)
                {
                    DataTable dtbValue = null;
                    lngRes = objHRPServ.lngGetDataTableWithoutParameters(strGetMax, ref dtbValue);
                    if (dtbValue == null || dtbValue.Rows.Count == 0)
                    {
                        p_objTypeVO.m_intMedicineTypeSetID = 1;
                    }
                    else
                    {
                        if (dtbValue.Rows[0][0] == DBNull.Value)
                        {
                            p_objTypeVO.m_intMedicineTypeSetID = 1;
                        }
                        else
                        {
                            p_objTypeVO.m_intMedicineTypeSetID = Convert.ToInt32(dtbValue.Rows[0][0]) + 1;
                        }
                    }
                }

                if (clsHRPTableService.bytDatabase_Selector != (byte)clsHRPTableService.enumDatabase_Selector.bytOracle)
                {
                    IDataParameter[] objDPArr = null;

                    for (int i = 0; i < p_objTypeVO.m_strMedicineTypeIDArr.Length; i++)
                    {
                        objHRPServ.CreateDatabaseParameter(3, out objDPArr);
                        objDPArr[0].Value = p_objTypeVO.m_intMedicineTypeSetID;
                        objDPArr[1].Value = p_objTypeVO.m_strMedicineTypeSetName;
                        objDPArr[2].Value = p_objTypeVO.m_strMedicineTypeIDArr[i];

                        lngRes = objHRPServ.lngExecuteParameterSQL(strSQL, ref lngEff, objDPArr);
                    }
                }
                else
                {
                    DbType[] dbTypes = new DbType[] { DbType.Int32, DbType.String, DbType.String };

                    object[][] objValues = new object[3][];

                    int intItemCount = p_objTypeVO.m_strMedicineTypeIDArr.Length;
                    for (int j = 0; j < objValues.Length; j++)
                    {
                        objValues[j] = new object[intItemCount];//初始化
                    }

                    for (int i = 0; i < intItemCount; i++)
                    {
                        objValues[0][i] = p_objTypeVO.m_intMedicineTypeSetID;
                        objValues[1][i] = p_objTypeVO.m_strMedicineTypeSetName;
                        objValues[2][i] = p_objTypeVO.m_strMedicineTypeIDArr[i];
                    }
                    lngRes = objHRPServ.m_lngSaveArrayWithParameters(strSQL, objValues, dbTypes);
                }
                p_objTypeVO = null;
            }
            catch (Exception objEx)
            {
                com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
示例#17
0
        public long m_lngSetApplPrintedStatus(string[] arrApplicationId, bool isPrinted)
        {
            //            long lngRes=0;

            //            StringBuilder sb=new StringBuilder();
            //            int len= arrApplicationId.Length;

            //            for (int i = 0; i <len; i++)
            //            {
            //                if (i != len - 1)
            //                {
            //                    sb.Append(arrApplicationId[i] + " ,");
            //                }
            //                else
            //                {
            //                    sb.Append(arrApplicationId[i]);
            //                }
            //            }

            //            string sqlFormat = @"  update t_opr_lis_application
            //                                      set printed_num = {0}
            //                                    where pstatus_int = 2
            //                                      and application_id_chr in ( {1} ) ";

            //            clsHRPTableService dbSvc = new clsHRPTableService();

            //            try
            //            {
            //                lngRes = dbSvc.DoExcute(string.Format(sqlFormat, isPrinted ? "1" : "0", sb.ToString()));
            //            }
            //            catch (Exception ex)
            //            {
            //                lngRes = 0;
            //                new clsLogText().LogError(ex.Message);
            //            }

            //            return lngRes;

            long lngRes = 1;
            int  n      = -1;

            com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();
            try
            {
                n = 0;
                if (isPrinted)
                {
                    string strSQL = @"update t_opr_lis_application
   set printed_num = 1, printed_date = sysdate
 where pstatus_int > 0
   and application_id_chr = ?";

                    DbType[] dbTypes = new DbType[] {
                        DbType.String
                    };
                    object[][] objValues = new object[1][];
                    for (int j = 0; j < objValues.Length; j++)
                    {
                        objValues[j] = new object[arrApplicationId.Length];//初始化
                    }
                    for (int k1 = 0; k1 < arrApplicationId.Length; k1++)
                    {
                        n = -1;
                        objValues[++n][k1] = arrApplicationId[k1].Trim();
                    }
                    if (arrApplicationId.Length > 0)
                    {
                        lngRes = objHRPSvc.m_lngSaveArrayWithParameters(strSQL, objValues, dbTypes);
                    }


                    //                     strSQL = @"
                    //                            update t_opr_lis_application
                    //                                     set printed_num = 1
                    //                                     where pstatus_int = 2
                    //                                     and application_id_chr =? ";

                    //                    dbTypes = new DbType[] {
                    //                        DbType.String

                    //                        };
                    //                    objValues = new object[1][];
                    //                    for (int j = 0; j < objValues.Length; j++)
                    //                    {
                    //                        objValues[j] = new object[arrApplicationId.Length];//初始化
                    //                    }
                    //                    for (int k1 = 0; k1 < arrApplicationId.Length; k1++)
                    //                    {
                    //                        n = -1;
                    //                        objValues[++n][k1] = arrApplicationId[k1].Trim();
                    //                    }
                    //                    if (arrApplicationId.Length > 0)
                    //                    {
                    //                        lngRes = objHRPSvc.m_lngSaveArrayWithParameters(strSQL, objValues, dbTypes);
                    //                    }
                }
                else
                {
                    string strSQL = @"  
                            update t_opr_lis_application
                                     set PRINTED_DATE = null,printed_num = 0
                                     where pstatus_int = 2
                                     and application_id_chr =? ";

                    DbType[] dbTypes = new DbType[] {
                        DbType.String
                    };
                    object[][] objValues = new object[1][];
                    for (int j = 0; j < objValues.Length; j++)
                    {
                        objValues[j] = new object[arrApplicationId.Length];//初始化
                    }
                    for (int k1 = 0; k1 < arrApplicationId.Length; k1++)
                    {
                        n = -1;
                        objValues[++n][k1] = arrApplicationId[k1].Trim();
                    }
                    if (arrApplicationId.Length > 0)
                    {
                        lngRes = objHRPSvc.m_lngSaveArrayWithParameters(strSQL, objValues, dbTypes);
                    }
                }
            }
            catch (Exception objEx)
            {
                string strTmp = objEx.Message;
                com.digitalwave.Utility.clsLogText objLogger = new clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
示例#18
0
        public long m_lngUpdateOrderAmount(clsBIHOrder[] m_arrOrder)
        {
            long      lngRes          = 0;
            ArrayList OrderATTACHList = new ArrayList();

            for (int k = 0; k < m_arrOrder.Length; k++)
            {
                if (m_arrOrder[k].m_intStatus != 0)
                {
                    OrderATTACHList.Add(m_arrOrder[k].m_strOrderID);
                }
            }
            if (OrderATTACHList.Count > 0)
            {
                int[]     intType  = new int[] { 0, 1, 5 };//0新开 1 提交 2 转抄
                ArrayList TypeList = new ArrayList(intType);
                bool      blnExist = false;
                lngRes = this.m_lngCheckOrderStatus(OrderATTACHList, TypeList, ref blnExist);
                if (lngRes < 1 || blnExist == false)
                {
                    return(-10);
                }
            }
            com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();
            string strSQL = "";

            try
            {
                int n = 0;

                strSQL = @"
                     update t_opr_bih_order                  
                        set   
                        GET_DEC=?
                        where
                        REGISTERID_CHR=?
                        and RECIPENO_INT=?
                    ";
                //m_lngUpdateOrderBooking(m_arrOrderBooking[i]);
                DbType[] dbTypes = new DbType[] {
                    DbType.Decimal, DbType.String, DbType.Int32
                };
                object[][] objValues = new object[3][];
                if (m_arrOrder.Length > 0)
                {
                    for (int j = 0; j < objValues.Length; j++)
                    {
                        objValues[j] = new object[m_arrOrder.Length];//初始化
                    }

                    for (int k1 = 0; k1 < m_arrOrder.Length; k1++)
                    {
                        n = -1;

                        objValues[++n][k1] = m_arrOrder[k1].m_dmlGet;
                        objValues[++n][k1] = m_arrOrder[k1].m_strRegisterID;
                        objValues[++n][k1] = m_arrOrder[k1].m_intRecipenNo;
                    }
                    lngRes = objHRPSvc.m_lngSaveArrayWithParameters(strSQL, objValues, dbTypes);
                }

                strSQL = @"
                update T_OPR_BIH_ORDERCHARGEDEPT a 
                set a.amount_dec=(select b.get_dec from t_opr_bih_order b where b.orderid_chr=?) 
                where
                a.flag_int=0
                and
                ORDERID_CHR=?
                ";
                DbType[] dbTypes2 = new DbType[] {
                    DbType.String, DbType.String
                };
                object[][] objValues2 = new object[2][];
                if (m_arrOrder.Length > 0)
                {
                    for (int j = 0; j < objValues2.Length; j++)
                    {
                        objValues2[j] = new object[m_arrOrder.Length];//初始化
                    }

                    for (int k1 = 0; k1 < m_arrOrder.Length; k1++)
                    {
                        n = -1;

                        objValues2[++n][k1] = m_arrOrder[k1].m_strOrderID;
                        objValues2[++n][k1] = m_arrOrder[k1].m_strOrderID;
                    }
                    lngRes = objHRPSvc.m_lngSaveArrayWithParameters(strSQL, objValues2, dbTypes2);
                }
            }
            catch (Exception objEx)
            {
                string strTmp = objEx.Message;
                com.digitalwave.Utility.clsLogText objLogger = new clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
示例#19
0
        public long m_lngSetAccount(System.Security.Principal.IPrincipal p_objPrincipal, string p_strEmpID, DateTime p_dtmAccountDate, string[] p_strChittyIDArr, string p_strStorageID)
        {
            if (p_strChittyIDArr == null || p_strChittyIDArr.Length == 0)
            {
                return(-1);
            }

            long lngRes = 0;

            try
            {
                string strSQL = @"update t_ds_instorage a set a.inaccount_dat=? ,a.inaccounterid_chr=?  where a.indrugstoreid_vchr=?";

                clsHRPTableService objHRPServ = new clsHRPTableService();
                DbType[]           dbTypes    = new DbType[] { DbType.DateTime, DbType.String, DbType.String };

                object[][] objValues = new object[3][];

                int intItemCount = p_strChittyIDArr.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_dtmAccountDate;
                    objValues[1][iRow] = p_strEmpID;
                    objValues[2][iRow] = p_strChittyIDArr[iRow];
                }
                lngRes = objHRPServ.m_lngSaveArrayWithParameters(strSQL, objValues, dbTypes);

                if (lngRes < 0)
                {
                    objHRPServ.Dispose();
                    objHRPServ = null;
                    throw new Exception();
                }
                strSQL  = @"update t_ds_outstorage a set a.inaccount_dat=? ,a.inaccounterid_chr=?  where a.outdrugstoreid_vchr=?";
                dbTypes = new DbType[] { DbType.DateTime, DbType.String, DbType.String };

                objValues = new object[3][];


                for (int j = 0; j < objValues.Length; j++)
                {
                    objValues[j] = new object[intItemCount];//初始化
                }
                for (int iRow = 0; iRow < intItemCount; iRow++)
                {
                    objValues[0][iRow] = p_dtmAccountDate;
                    objValues[1][iRow] = p_strEmpID;
                    objValues[2][iRow] = p_strChittyIDArr[iRow];
                }
                lngRes = objHRPServ.m_lngSaveArrayWithParameters(strSQL, objValues, dbTypes);

                if (lngRes < 0)
                {
                    objHRPServ.Dispose();
                    objHRPServ = null;
                    throw new Exception();
                }
                strSQL  = @"update t_ds_drugstorecheck a set a.inaccountdate_dat=? ,a.inaccountid_chr=?  where a.checkid_chr=?";
                dbTypes = new DbType[] { DbType.DateTime, DbType.String, DbType.String };

                objValues = new object[3][];


                for (int j = 0; j < objValues.Length; j++)
                {
                    objValues[j] = new object[intItemCount];//初始化
                }
                for (int iRow = 0; iRow < intItemCount; iRow++)
                {
                    objValues[0][iRow] = p_dtmAccountDate;
                    objValues[1][iRow] = p_strEmpID;
                    objValues[2][iRow] = p_strChittyIDArr[iRow];
                }
                lngRes = objHRPServ.m_lngSaveArrayWithParameters(strSQL, objValues, dbTypes);

                if (lngRes < 0)
                {
                    objHRPServ.Dispose();
                    objHRPServ = null;
                    throw new Exception();
                }

                strSQL  = @"update t_ds_adjustprice a set a.inaccountdate_dat=? ,a.inaccountid_chr=?  where a.adjustpriceid_vchr=?";
                dbTypes = new DbType[] { DbType.DateTime, DbType.String, DbType.String };

                objValues = new object[3][];
                for (int j = 0; j < objValues.Length; j++)
                {
                    objValues[j] = new object[intItemCount];//初始化
                }
                for (int iRow = 0; iRow < intItemCount; iRow++)
                {
                    objValues[0][iRow] = p_dtmAccountDate;
                    objValues[1][iRow] = p_strEmpID;
                    objValues[2][iRow] = p_strChittyIDArr[iRow];
                }
                lngRes = objHRPServ.m_lngSaveArrayWithParameters(strSQL, objValues, dbTypes);

                if (lngRes < 0)
                {
                    objHRPServ.Dispose();
                    objHRPServ = null;
                    throw new Exception();
                }

                strSQL  = @"update t_ds_initial a set a.inaccounterid_chr=?  where a.initialid_chr=?";
                dbTypes = new DbType[] { DbType.String, DbType.String };

                objValues = new object[2][];
                for (int j = 0; j < objValues.Length; j++)
                {
                    objValues[j] = new object[intItemCount];//初始化
                }
                for (int iRow = 0; iRow < intItemCount; iRow++)
                {
                    objValues[0][iRow] = p_strEmpID;
                    objValues[1][iRow] = p_strChittyIDArr[iRow];
                }
                lngRes = objHRPServ.m_lngSaveArrayWithParameters(strSQL, objValues, dbTypes);

                if (lngRes < 0)
                {
                    objHRPServ.Dispose();
                    objHRPServ = null;
                    throw new Exception();
                }

                strSQL  = @"update t_ds_account_detail a
   set a.state_int = 1, a.inaccountdate_dat = ?, a.inaccountid_chr = ?
 where a.chittyid_vchr = ?";
                dbTypes = new DbType[] { DbType.DateTime, DbType.String, DbType.String };

                objValues = new object[3][];
                for (int j = 0; j < objValues.Length; j++)
                {
                    objValues[j] = new object[intItemCount];//初始化
                }
                for (int iRow = 0; iRow < intItemCount; iRow++)
                {
                    objValues[0][iRow] = p_dtmAccountDate;
                    objValues[1][iRow] = p_strEmpID;
                    objValues[2][iRow] = p_strChittyIDArr[iRow];
                }
                lngRes = objHRPServ.m_lngSaveArrayWithParameters(strSQL, objValues, dbTypes);

                if (lngRes <= 0)
                {
                    objHRPServ.Dispose();
                    objHRPServ = null;
                    throw new Exception();
                }
                objHRPServ.Dispose();
                objHRPServ = null;
            }
            catch (Exception objEx)
            {
                com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
示例#20
0
        public long m_lngModiffyAppStatus(com.digitalwave.iCare.ValueObject.clsOutpatientRecipe_VO[] objRecipeVO)
        {
            //foreach (KeyValuePair<string, string> kvp in p_dicApp)
            //{
            //    if (kvp.Value.ToString() == "lis")
            //    {
            //        this.m_lngModiffyLisAppStatus(p_Recipe, kvp.Key.ToString());
            //    }

            //    if (kvp.Value.ToString() == "test")
            //    {
            //        this.m_lngModiffyTestAppStatus(p_Recipe, kvp.Key.ToString());
            //    }

            //    if (kvp.Value.ToString() == "ops")
            //    {
            //        this.m_lngModiffyOpsAppStatus(p_Recipe, kvp.Key.ToString());
            //    }
            //}
            long   lngRes = -1;
            string strSQL = string.Empty;
            long   lngEff = -1;

            strSQL = @"insert into t_opr_itemconfirm
                                              (outpatrecipedeid_chr,
                                               outpatrecipeid_chr,
                                               empno_vchr,record_dat,status_int)
                                            values
                                              ( ?, ?, ?, sysdate, 1)";
            clsHRPTableService objHRPSvc = null;

            try
            {
                int        intRowsCount = objRecipeVO.Length;
                object[][] objParams    = new object[3][];
                for (int i1 = 0; i1 < 3; i1++)
                {
                    objParams[i1] = new object[intRowsCount];
                }
                for (int i1 = 0; i1 < intRowsCount; i1++)
                {
                    objParams[0][i1] = objRecipeVO[i1].m_strOutpatRecipeID.Trim();
                    objParams[1][i1] = objRecipeVO[i1].m_strOutpatRecipeNo.Trim();
                    objParams[2][i1] = objRecipeVO[i1].strDIAG_VCHR.Trim();
                }
                DbType[] objTypes = new DbType[3] {
                    DbType.String, DbType.String, DbType.String
                };
                objHRPSvc = new clsHRPTableService();
                lngRes    = objHRPSvc.m_lngSaveArrayWithParameters(strSQL, objParams, objTypes);
            }
            catch (Exception objEX)
            {
                clsLogText objLog = new clsLogText();
                objLog.LogError(objEX);
            }
            finally
            {
                if (objHRPSvc != null)
                {
                    objHRPSvc.Dispose();
                    objHRPSvc = null;
                }
            }
            return(lngRes);
        }