Example #1
0
        public long m_lngAddAppUserGroup(System.Security.Principal.IPrincipal p_objPrincipal, ref clsApplUserGroup_VO objApplUserGroup)
        {
            long lngRes = 0;

            clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService();

            lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.LIS.clsAppGroupSvc", "m_lngAddAppUserGroup");
            if (lngRes < 0)
            {
                return(-1);
            }

            string strSQL = @"INSERT INTO t_aid_lis_appuser_group
										  (user_group_id_chr, user_group_name_vchr, has_child_group,
										   py_code_chr, assist_code01_chr, wb_code_chr, assist_code02_chr,
										   group_flag_chr, operator_id_chr,summary_vchr
										   )
								    VALUES (?, ?, ?, ?, ?, ?, ?,  ?, ?,?)"                                ;

            try
            {
                com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();
                System.Data.IDataParameter[] objApplUserGroupArr = null;
                objHRPSvc.CreateDatabaseParameter(10, out objApplUserGroupArr);

                if (objApplUserGroup.strUserGroupID == null)
                {
                    objApplUserGroup.strUserGroupID = objHRPSvc.m_strGetNewID("t_aid_lis_appuser_group", "user_group_id_chr", 6);
                }

                objApplUserGroupArr[0].Value = objApplUserGroup.strUserGroupID;
                objApplUserGroupArr[1].Value = objApplUserGroup.strUserGroupName;
                objApplUserGroupArr[2].Value = objApplUserGroup.strHasChildGroup;
                objApplUserGroupArr[3].Value = objApplUserGroup.strPYCode;
                objApplUserGroupArr[4].Value = objApplUserGroup.strAssistCode01;
                objApplUserGroupArr[5].Value = objApplUserGroup.strWBCode;
                objApplUserGroupArr[6].Value = objApplUserGroup.strAssistCode02;
                objApplUserGroupArr[7].Value = objApplUserGroup.strGroupFlag;
                objApplUserGroupArr[8].Value = objApplUserGroup.strOperatorID;

                objApplUserGroupArr[9].Value = objApplUserGroup.strSummary;

                long lngRecEff = -1;
                lngRes = objHRPSvc.lngExecuteParameterSQL(strSQL, ref lngRecEff, objApplUserGroupArr);
                objHRPSvc.Dispose();
            }
            catch (Exception objEx)
            {
                com.digitalwave.Utility.clsLogText objLogger = new clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
Example #2
0
        public long m_lngAddReportGroup(System.Security.Principal.IPrincipal p_objPrincipal, ref clsReportGroup_VO objReportGroupVO)
        {
            long lngRes = 0;

            clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService();

            lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.LIS.clsCheckGroupSvc", "m_lngAddReportGroup");
            if (lngRes < 0)
            {
                return(-1);
            }

            string strSQL = @"INSERT INTO t_aid_lis_report_group
										  (report_group_id_chr, report_group_name_vchr, py_code_chr,
										   print_title_vchr, wb_code_chr, assist_code01_chr,
										   assist_code02_chr, print_category_id_chr
										  )
								  VALUES (?, ?, ?, ?, ?, ?, ?, ?)"                                ;

            try
            {
                com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();
                System.Data.IDataParameter[] objReportGroupArr = null;
                objHRPSvc.CreateDatabaseParameter(8, out objReportGroupArr);

                if (objReportGroupVO.strReportGroupID == null)
                {
                    objReportGroupVO.strReportGroupID = objHRPSvc.m_strGetNewID("t_aid_lis_report_group", "REPORT_GROUP_ID_CHR", 6);
                }

                objReportGroupArr[0].Value = objReportGroupVO.strReportGroupID;
                objReportGroupArr[1].Value = objReportGroupVO.strReportGroupName;
                objReportGroupArr[2].Value = objReportGroupVO.strPYCode;
                objReportGroupArr[3].Value = objReportGroupVO.strPrintTitle;
                objReportGroupArr[4].Value = objReportGroupVO.strWBCode;
                objReportGroupArr[5].Value = objReportGroupVO.strAssistCode01;
                objReportGroupArr[6].Value = objReportGroupVO.strAssistCode02;
                objReportGroupArr[7].Value = objReportGroupVO.strPrintCategoryID;

                long lngRecEff = -1;
                lngRes = objHRPSvc.lngExecuteParameterSQL(strSQL, ref lngRecEff, objReportGroupArr);
                objHRPSvc.Dispose();
            }
            catch (Exception objEx)
            {
                com.digitalwave.Utility.clsLogText objLogger = new clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
Example #3
0
        public long m_lngAddApplUnit(System.Security.Principal.IPrincipal p_objPrincipal, ref clsApplUnit_VO objApplUnitVO)
        {
            long lngRes = 0;

            clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService();

            lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.LIS.clsApplyUnitSvc", "m_lngAddApplyUnit");
            if (lngRes < 0)
            {
                return(-1);
            }

            string strSQL = @"INSERT INTO t_aid_lis_apply_unit
										  (apply_unit_id_chr, apply_unit_name_vchr, other_name_vchr,
										   py_code_chr, assist_code01_chr, wb_code_chr, assist_code02_chr,
										   check_category_id_chr, is_no_food_required_chr,
										   is_physical_exam_required_chr,is_reservation_required_chr,
										   PRICE_NUM,COST_NUM,SAMPLE_TYPE_ID_CHR,SUMMARY_VCHR,OUTER_CHECK_FLAG_NUM, REPORTHOUR, SamplingInstr 
										   )
								    VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?,?,?, ?, ?)"                                ;

            try
            {
                com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();
                System.Data.IDataParameter[] objApplUnitArr = null;
                objHRPSvc.CreateDatabaseParameter(18, out objApplUnitArr);

                if (objApplUnitVO.strApplUnitID == null)
                {
                    objApplUnitVO.strApplUnitID = objHRPSvc.m_strGetNewID("t_aid_lis_apply_unit", "apply_unit_id_chr", 6);
                }

                objApplUnitArr[0].Value  = objApplUnitVO.strApplUnitID;
                objApplUnitArr[1].Value  = objApplUnitVO.strApplUnitName;
                objApplUnitArr[2].Value  = objApplUnitVO.strOtherName;
                objApplUnitArr[3].Value  = objApplUnitVO.strPYCode;
                objApplUnitArr[4].Value  = objApplUnitVO.strAssistCode01;
                objApplUnitArr[5].Value  = objApplUnitVO.strWBCode;
                objApplUnitArr[6].Value  = objApplUnitVO.strAssistCode02;
                objApplUnitArr[7].Value  = objApplUnitVO.strCheckCategoryID;
                objApplUnitArr[8].Value  = objApplUnitVO.strIsNoFoodRequired;
                objApplUnitArr[9].Value  = objApplUnitVO.strIsPhysicsExamRequired;
                objApplUnitArr[10].Value = objApplUnitVO.strIsReservationRequired;
                objApplUnitArr[11].Value = objApplUnitVO.strPrice;
                objApplUnitArr[12].Value = objApplUnitVO.strCost;
                objApplUnitArr[13].Value = objApplUnitVO.strSampleTypeID;
                objApplUnitArr[14].Value = objApplUnitVO.strSummary;
                objApplUnitArr[15].Value = objApplUnitVO.strOutCheckFlag;
                objApplUnitArr[16].Value = objApplUnitVO.ReportHour;
                objApplUnitArr[17].Value = objApplUnitVO.SamplingInstr;

                long lngRecEff = -1;
                lngRes = objHRPSvc.lngExecuteParameterSQL(strSQL, ref lngRecEff, objApplUnitArr);
                objHRPSvc.Dispose();
            }
            catch (Exception objEx)
            {
                com.digitalwave.Utility.clsLogText objLogger = new clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }