Beispiel #1
0
        public long m_lngFind(System.Security.Principal.IPrincipal p_objPrincipal, int p_intSeq, out clsLisQCReportVO p_objQCReport)
        {
            long lngRes = 0;

            p_objQCReport = 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_objQCReport = new clsLisQCReportVO();
                    this.ConstructVO(dtbResult.Rows[0], ref p_objQCReport);
                }
            }
            catch (Exception objEx)
            {
                new clsLogText().LogError(objEx);
            }
            return(lngRes);
        }
Beispiel #2
0
        public long m_lngUpdate(System.Security.Principal.IPrincipal p_objPrincipal, clsLisQCReportVO QCBatch)
        {
            long lngRes = 0;
            clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService();

            lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, m_strCurrentSvcDetailName, "m_lngUpdate");
            if (lngRes <= 0)
            {
                return(-1);
            }
            com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();


            try
            {
                System.Data.IDataParameter[] objODPArr = GetUpdateDataParameterArr(QCBatch);
                long lngRecEff = -1;
                //往表增加记录
                lngRes = 0;
                lngRes = objHRPSvc.lngExecuteParameterSQL(m_strUpdateSql, ref lngRecEff, objODPArr);
                objHRPSvc.Dispose();
            }
            catch (Exception objEx)
            {
                new clsLogText().LogError(objEx);
            }
            return(lngRes);
        }
Beispiel #3
0
 public frmQCReport(clsLisQCReportVO report)
 {
     InitializeComponent();
     this.m_objReport     = report;
     this.m_dtMonth       = report.m_dtReport;
     this.m_intQCBatchSeq = report.m_intQCBatchSeq;
 }
Beispiel #4
0
        private void m_cmdNew_Click(object sender, EventArgs e)
        {
            if (m_objQCBatch == null || m_objQCBatch.Count != 1)
            {
                return;
            }

            m_cmdNew.Enabled = false;

            frmQCReport frm = new frmQCReport(m_objQCBatch.SeqArr[0]);

            frm.BrokenRules = m_objQCBatch.BrokenRules;
            if (frm.ShowDialog() == DialogResult.OK)
            {
                clsLisQCReportVO var = frm.Report;
                this.m_objQCBatch.GetReports().Add(var);
                ListViewItem item = new ListViewItem();
                this.m_mthListViewItemInit(var, item);
                this.m_lsvReport.Items.Add(item);
                this.m_lsvReport.Focus();
                item.Selected = true;
            }

            m_cmdNew.Enabled = true;
        }
Beispiel #5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="p_objQCReport"></param>
 /// <param name="p_intSeq"></param>
 /// <returns></returns>
 public long m_lngInsertQCReport(clsLisQCReportVO p_objQCReport, out int p_intSeq)
 {
     using (clsTmdQCDataSvc svc = new clsTmdQCDataSvc())
     {
         return(svc.m_lngInsertQCReport(this.objPrincipal, p_objQCReport, out p_intSeq));
     }
 }
Beispiel #6
0
 /// <summary>
 /// m_lngUpdateQCReport
 /// </summary>
 /// <param name="QCBatch"></param>
 /// <returns></returns>
 public long m_lngUpdateQCReport(clsLisQCReportVO QCBatch)
 {
     using (clsTmdQCDataSvc svc = new clsTmdQCDataSvc())
     {
         return(svc.m_lngUpdateQCReport(this.objPrincipal, QCBatch));
     }
 }
Beispiel #7
0
 private clsLisQCReportVO[] ConstructVOArr(DataTable dtbResult)
 {
     clsLisQCReportVO[] p_objResultArr = new clsLisQCReportVO[dtbResult.Rows.Count];
     for (int i = 0; i < p_objResultArr.Length; i++)
     {
         p_objResultArr[i] = new clsLisQCReportVO();
         ConstructVO(dtbResult.Rows[i], ref p_objResultArr[i]);
     }
     return(p_objResultArr);
 }
Beispiel #8
0
        public long m_lngUpdate(clsLisQCReportVO p_objRecord)
        {
            long lngRes = 0;

            try
            {
                lngRes = m_objSvc.m_lngUpdate(m_objPrincipal, p_objRecord);
            }
            catch { lngRes = 0; }
            return(lngRes);
        }
Beispiel #9
0
        public long m_lngFind(int p_intID, out clsLisQCReportVO p_objRecord)
        {
            long lngRes = 0;

            p_objRecord = null;
            try
            {
                lngRes = m_objSvc.m_lngFind(m_objPrincipal, p_intID, out p_objRecord);
            }
            catch { lngRes = 0; }
            return(lngRes);
        }
Beispiel #10
0
        private void m_cmdDelete_Click(object sender, EventArgs e)
        {
            if (this.m_lsvReport.SelectedItems.Count <= 0)
            {
                return;
            }

            Cursor.Current           = Cursors.WaitCursor;
            this.m_cmdDelete.Enabled = false;

            ListViewItem     item = this.m_lsvReport.SelectedItems[0];
            clsLisQCReportVO obj  = item.Tag as clsLisQCReportVO;

            obj.m_enmStatus = enmQCStatus.Delete;

            long lngRes = clsTmdQCReportSmp.s_object.m_lngUpdate(obj);

            if (lngRes > 0)
            {
                this.m_objQCBatch.GetReports().Remove(obj);

                int intCurrItemIdx = item.Index;
                item.Remove();

                int next = -1;
                if (this.m_lsvReport.Items.Count > intCurrItemIdx)
                {
                    next = intCurrItemIdx;
                }
                else if (this.m_lsvReport.Items.Count == intCurrItemIdx && intCurrItemIdx > 0)
                {
                    next = intCurrItemIdx - 1;
                }

                if (next != -1)
                {
                    this.m_lsvReport.Focus();
                    this.m_lsvReport.Items[next].Selected = true;
                }
                else
                {
                }
            }
            else
            {
                obj.m_enmStatus = enmQCStatus.Natrural;
                clsCommonDialog.m_mthShowDBError();
            }

            Cursor.Current           = Cursors.Default;
            this.m_cmdDelete.Enabled = true;
        }
Beispiel #11
0
        public long m_lngFind(System.Security.Principal.IPrincipal p_objPrincipal, int p_intQCBatchSeq, DateTime p_datBegin, DateTime p_datEnd, enmQCStatus p_status, out clsLisQCReportVO[] p_objQCReportArr)
        {
            long lngRes = 0;

            p_objQCReportArr = null;
            clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService();

            lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.LIS.clsTmdQCBatchConcentrationSvc", "m_lngFind");
            if (lngRes <= 0)
            {
                return(-1);
            }
            try
            {
                string strSQL = m_strFindExtSql;

                com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();
                System.Data.IDataParameter[] objODPArr = null;

                if (p_status == enmQCStatus.Delete || p_status == enmQCStatus.Natrural)
                {
                    objODPArr = clsPublicSvc.m_objConstructIDataParameterArr(
                        (int)p_status, p_intQCBatchSeq, p_datBegin, p_datEnd);
                }
                else
                {
                    strSQL    = strSQL.Replace("AND t1.status_int = ?", "AND 3 = ?");
                    objODPArr = clsPublicSvc.m_objConstructIDataParameterArr(
                        3, p_intQCBatchSeq, p_datBegin, p_datEnd);
                }

                DataTable dtbResult = null;
                lngRes = 0;
                lngRes = objHRPSvc.lngGetDataTableWithParameters(strSQL, ref dtbResult, objODPArr);
                objHRPSvc.Dispose();
                if (lngRes == 1 && dtbResult != null && dtbResult.Rows.Count > 0)
                {
                    p_objQCReportArr = new clsLisQCReportVO[dtbResult.Rows.Count];
                    for (int i = 0; i < p_objQCReportArr.Length; i++)
                    {
                        p_objQCReportArr[i] = new clsLisQCReportVO();
                        this.ConstructVO(dtbResult.Rows[i], ref p_objQCReportArr[i]);
                        p_objQCReportArr[i].m_strReportorName = dtbResult.Rows[i]["reportor_name"].ToString().Trim();
                    }
                }
            }
            catch (Exception objEx)
            {
                new clsLogText().LogError(objEx);
            }
            return(lngRes);
        }
Beispiel #12
0
        private void m_cmdPrint_Click(object sender, EventArgs e)
        {
            if (this.m_lsvReport.SelectedItems.Count <= 0)
            {
                return;
            }
            ListViewItem     item = this.m_lsvReport.SelectedItems[0];
            clsLisQCReportVO obj  = item.Tag as clsLisQCReportVO;

            clsQCDailyReportToolStrategy print = new clsQCDailyReportToolStrategy(obj, this.m_objQCBatch.GetQCBatchSet());

            print.m_mthPrint();
        }
Beispiel #13
0
 /// <summary>
 /// m_mthControlsDisplayVOValue
 /// </summary>
 /// <param name="objReport"></param>
 private void m_mthControlsDisplayVOValue(clsLisQCReportVO objReport)
 {
     if (objReport != null)
     {
         m_lblBatchNO.Text            = DBAssist.ToString(objReport.m_intQCBatchSeq);
         this.m_chkLost.Checked       = objReport.m_enmQCControlStatus == enmQCControlStatus.Control ? false : true;
         m_txtAppDoct.m_StrEmployeeID = objReport.m_strReportorId;
         m_txtUnmatchedRule.Text      = objReport.m_strUnmatchedRule;
         m_txtReason.Text             = objReport.m_strReason;
         m_txtProcess.Text            = objReport.m_strProcess;
         m_txtSummary.Text            = objReport.m_strSummary;
         m_dtpReport.Value            = objReport.m_dtReport;
     }
 }
Beispiel #14
0
 /// <summary>
 /// m_mthQCAnalysisMonth
 /// </summary>
 /// <param name="p_dtMonth"></param>
 private void m_mthQCAnalysisMonth(DateTime p_dtMonth)
 {
     if (!this.m_objBatch.IsNull)
     {
         if (this.m_objBatch.Count == 1)
         {
             DateTime t  = Convert.ToDateTime(p_dtMonth.ToString("yyyy-MM"));
             DateTime t2 = p_dtMonth.AddMonths(1).AddSeconds(-1.0);
             List <clsLisQCReportVO> objReports       = this.m_objBatch.m_objReports;
             clsLisQCReportVO        clsLisQCReportVO = null;
             for (int i = 0; i < objReports.Count; i++)
             {
                 clsLisQCReportVO clsLisQCReportVO2 = objReports[i];
                 if (objReports[i].m_intReportStats == 1)
                 {
                     if (clsLisQCReportVO2.m_dtReport >= t && clsLisQCReportVO2.m_dtReport <= t2)
                     {
                         clsLisQCReportVO = clsLisQCReportVO2;
                         break;
                     }
                 }
             }
             frmQCReport frmQCReport;
             if (clsLisQCReportVO != null)
             {
                 frmQCReport            = new frmQCReport(clsLisQCReportVO);
                 frmQCReport.m_blIsDate = false;
             }
             else
             {
                 frmQCReport               = new frmQCReport(this.m_objBatch.SeqArr[0], p_dtMonth);
                 frmQCReport.m_blIsDate    = false;
                 frmQCReport.BrokenRules   = this.m_objBatch.BrokenRules;
                 frmQCReport.m_lblSeq.Text = "质控批序号:" + this.m_objBatch.SeqArr[0].ToString();
             }
             if (frmQCReport.ShowDialog() == DialogResult.OK)
             {
                 clsLisQCReportVO report = frmQCReport.Report;
                 if (clsLisQCReportVO == null)
                 {
                     this.m_objBatch.m_objReports.Add(report);
                 }
                 else
                 {
                     report.m_mthCopyTo(clsLisQCReportVO);
                 }
             }
         }
     }
 }
Beispiel #15
0
 private void m_mthListViewItemInit(clsLisQCReportVO p_objReportVO, ListViewItem item)
 {
     item.Text = DBAssist.ToString(p_objReportVO.m_dtReport, "yyyy-MM-dd");
     if (p_objReportVO.m_enmQCControlStatus == enmQCControlStatus.Control)
     {
         item.SubItems.Add("");
     }
     else
     {
         item.SubItems.Add("¡ø");
     }
     item.SubItems.Add(p_objReportVO.m_strUnmatchedRule);
     item.SubItems.Add(p_objReportVO.m_strReportorName);
     item.Tag = p_objReportVO;
 }
Beispiel #16
0
 private void m_mthListViewItemChange(clsLisQCReportVO p_objReportVO, ListViewItem item)
 {
     item.Text = DBAssist.ToString(p_objReportVO.m_dtReport, "yyyy-MM-dd");
     if (p_objReportVO.m_enmQCControlStatus == enmQCControlStatus.Control)
     {
         item.SubItems[1].Text = "";
     }
     else
     {
         item.SubItems[1].Text = "¡ø";
     }
     item.SubItems[2].Text = p_objReportVO.m_strUnmatchedRule;
     item.SubItems[3].Text = p_objReportVO.m_strReportorName;
     item.Tag = p_objReportVO;
 }
Beispiel #17
0
 /// <summary>
 /// GetUpdateDataParameterArr
 /// </summary>
 /// <param name="p_objQCReport"></param>
 /// <returns></returns>
 private IDataParameter[] GetUpdateDataParameterArr(clsLisQCReportVO p_objQCReport)
 {
     return(clsPublicSvc.m_objConstructIDataParameterArr(new object[] { p_objQCReport.m_intQCBatchSeq,
                                                                        (int)p_objQCReport.m_enmQCControlStatus,
                                                                        p_objQCReport.m_strUnmatchedRule,
                                                                        p_objQCReport.m_strReason,
                                                                        p_objQCReport.m_strProcess,
                                                                        p_objQCReport.m_strSummary,
                                                                        DBAssist.ToObject(p_objQCReport.m_dtReport),
                                                                        p_objQCReport.m_strReportorId,
                                                                        (int)p_objQCReport.m_enmStatus,
                                                                        p_objQCReport.m_dtModify,
                                                                        p_objQCReport.m_intReportStats,
                                                                        p_objQCReport.m_intSeq }));
 }
Beispiel #18
0
        public long m_lngUpdateQCReport(IPrincipal p_objPrincipal, clsLisQCReportVO QCBatch)
        {
            long num = 0L;
            clsPrivilegeHandleService clsPrivilegeHandleService = new clsPrivilegeHandleService();

            num = clsPrivilegeHandleService.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.LIS.clsQCBusiness_Serv", "m_lngUpdateQCReport");
            long result;

            if (num <= 0L)
            {
                result = -1L;
            }
            else
            {
                clsHRPTableService svc = new clsHRPTableService();
                try
                {
                    IDataParameter[] updateDataParameterArr = this.GetUpdateDataParameterArr(QCBatch);
                    long             num2 = -1L;
                    num = 0L;
                    string Sql = @"update t_opr_lis_qcreport
                                           set qcbatch_seq_int    = ?,
                                               qcstatus_int       = ?,
                                               unmatchedrule_vchr = ?,
                                               reason_vchr        = ?,
                                               process_vchr       = ?,
                                               summary_vchr       = ?,
                                               report_dat         = ?,
                                               reportor_id_chr    = ?,
                                               status_int         = ?,
                                               modify_dat         = ?,
                                               report_stats_int   = ?
                                         where qcreport_seq_int = ? ";

                    num = svc.lngExecuteParameterSQL(Sql, ref num2, updateDataParameterArr);
                }
                catch (Exception objEx)
                {
                    new clsLogText().LogError(objEx);
                }
                finally
                {
                    svc.Dispose();
                }
                result = num;
            }
            return(result);
        }
Beispiel #19
0
 /// <summary>
 /// 控件赋值给Vo
 /// </summary>
 /// <param name="objRule">赋值的实例</param>
 private void m_mthBindControlValueToObj(clsLisQCReportVO objReport)
 {
     try
     {
         //objReport.m_intQCBatchSeq = int.Parse(m_lblBatchNO.Text);
         objReport.m_enmQCControlStatus = !this.m_chkLost.Checked ? enmQCControlStatus.Control : enmQCControlStatus.UnControl;
     }
     catch { }
     objReport.m_strReportorId    = m_txtAppDoct.m_StrEmployeeID;
     objReport.m_strUnmatchedRule = m_txtUnmatchedRule.Text;
     objReport.m_strReason        = m_txtReason.Text;
     objReport.m_strProcess       = m_txtProcess.Text;
     objReport.m_strSummary       = m_txtSummary.Text;
     objReport.m_dtReport         = DateTime.Parse(m_dtpReport.Value.ToString("yyyy-MM-dd HH:mm:ss"));
     objReport.m_strReportorName  = m_txtAppDoct.m_StrEmployeeName;
 }
Beispiel #20
0
        private void m_cmdNew_Click(object sender, EventArgs e)
        {
            frmQCReport frm = new frmQCReport(this.m_objQCBatch.Seq);

            frm.BrokenRules = this.m_objQCBatch.BrokenRules;
            if (frm.ShowDialog() == DialogResult.OK)
            {
                clsLisQCReportVO var = frm.Report;
                this.m_objQCBatch.GetReports().Add(var);
                ListViewItem item = new ListViewItem();
                this.m_mthListViewItemInit(var, item);
                this.m_lsvReport.Items.Add(item);
                this.m_lsvReport.Focus();
                item.Selected = true;
            }
        }
Beispiel #21
0
        public long m_lngInsert(clsLisQCReportVO p_objRecord)
        {
            int  intID  = -1;
            long lngRes = 0;

            try
            {
                lngRes = m_objSvc.m_lngInsert(m_objPrincipal, p_objRecord, out intID);
            }
            catch { lngRes = 0; }
            if (lngRes > 0)
            {
                p_objRecord.m_intSeq = intID;
            }
            return(lngRes);
        }
Beispiel #22
0
        public long m_lngInsert(System.Security.Principal.IPrincipal p_objPrincipal, clsLisQCReportVO p_objQCReport, out int p_intSeq)
        {
            long lngRes = 0;

            p_intSeq = -1;
            clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService();

            lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, m_strCurrentSvcDetailName, "m_lngInsert");
            if (lngRes <= 0)
            {
                return(-1);
            }
            com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();

            try
            {
                lngRes = 0;
                lngRes = objHRPSvc.m_lngGenerateNewID(m_strTableName, m_strPrimaryKey, out p_intSeq);
                if (lngRes <= 0)
                {
                    return(-1);
                }
                lngRes = 0;

                p_objQCReport.m_dtModify = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
                System.Data.IDataParameter[] objODPArr = GetInsertDataParameterArr(p_objQCReport, p_intSeq);

                long lngRecEff = -1;
                //往表增加记录
                lngRes = 0;
                lngRes = objHRPSvc.lngExecuteParameterSQL(m_strInsertSql, ref lngRecEff, objODPArr);
                objHRPSvc.Dispose();
                if (lngRes > 0)
                {
                    p_objQCReport.m_intSeq = p_intSeq;//给VO赋值ID
                }
                else
                {
                    p_intSeq = -1;
                }
            }
            catch (Exception objEx)
            {
                new clsLogText().LogError(objEx);
            }
            return(lngRes);
        }
Beispiel #23
0
 private System.Data.IDataParameter[] GetUpdateDataParameterArr(clsLisQCReportVO p_objQCReport)
 {
     System.Data.IDataParameter[] objODPArr = clsPublicSvc.m_objConstructIDataParameterArr
                                              (
         p_objQCReport.m_intQCBatchSeq,
         (int)p_objQCReport.m_enmQCControlStatus,
         p_objQCReport.m_strUnmatchedRule,
         p_objQCReport.m_strReason,
         p_objQCReport.m_strProcess,
         p_objQCReport.m_strSummary,
         DBAssist.ToObject(p_objQCReport.m_dtReport),
         p_objQCReport.m_strReportorId,
         (int)p_objQCReport.m_enmStatus,
         p_objQCReport.m_dtModify,
         p_objQCReport.m_intSeq
                                              );
     return(objODPArr);
 }
Beispiel #24
0
 private void m_cmdModify_Click(object sender, EventArgs e)
 {
     if (this.m_lsvReport.SelectedItems.Count > 0)
     {
         ListViewItem     item = this.m_lsvReport.SelectedItems[0];
         clsLisQCReportVO temp = new clsLisQCReportVO();
         clsLisQCReportVO curr = item.Tag as clsLisQCReportVO;
         curr.m_mthCopyTo(temp);
         frmQCReport frm = new frmQCReport(temp);
         frm.BrokenRules = this.m_objQCBatch.BrokenRules;
         if (frm.ShowDialog() == DialogResult.OK)
         {
             clsLisQCReportVO var = frm.Report;
             var.m_mthCopyTo(curr);
             this.m_mthListViewItemChange(curr, item);
         }
     }
 }
Beispiel #25
0
        /// <summary>
        /// 质控报告
        /// </summary>
        /// <returns></returns>
        public List <clsLisQCReportVO> GetReports(int p_intBatchSeq)
        {
            if (this.IsNull)
            {
                return(null);
            }

            List <clsLisQCReportVO> reportList = new List <clsLisQCReportVO>();
            clsLisQCReportVO        objTemp    = null;

            foreach (clsLisQCReportVO report in m_objReports)
            {
                if (report.m_intQCBatchSeq == p_intBatchSeq)
                {
                    objTemp = new clsLisQCReportVO();
                    report.m_mthCopyTo(objTemp);
                    reportList.Add(objTemp);
                }
            }
            return(reportList);
        }
Beispiel #26
0
 public void ConstructVO(DataRow p_dtrSource, ref clsLisQCReportVO p_objQCReport)
 {
     p_objQCReport.m_intSeq        = DBAssist.ToInt32(p_dtrSource["QCREPORT_SEQ_INT"]);
     p_objQCReport.m_intQCBatchSeq = DBAssist.ToInt32(p_dtrSource["QCBATCH_SEQ_INT"]);
     try
     {
         p_objQCReport.m_enmQCControlStatus = (enmQCControlStatus)DBAssist.ToInt32(p_dtrSource["QCSTATUS_INT"]);
     }
     catch { }
     try
     {
         p_objQCReport.m_enmStatus = (enmQCStatus)DBAssist.ToInt32(p_dtrSource["STATUS_INT"].ToString());
     }
     catch { }
     p_objQCReport.m_strUnmatchedRule = p_dtrSource["UNMATCHEDRULE_VCHR"].ToString();
     p_objQCReport.m_strReason        = p_dtrSource["REASON_VCHR"].ToString();
     p_objQCReport.m_strProcess       = p_dtrSource["PROCESS_VCHR"].ToString();
     p_objQCReport.m_strSummary       = p_dtrSource["SUMMARY_VCHR"].ToString();
     p_objQCReport.m_dtReport         = DBAssist.ToDateTime(p_dtrSource["REPORT_DAT"].ToString());
     p_objQCReport.m_strReportorId    = p_dtrSource["REPORTOR_ID_CHR"].ToString();
     p_objQCReport.m_dtModify         = DBAssist.ToDateTime(p_dtrSource["MODIFY_DAT"]);
 }
Beispiel #27
0
        private System.Data.IDataParameter[] GetInsertDataParameterArr(clsLisQCReportVO p_objQCReport, int p_intSeq)
        {
            // QCREPORT_SEQ_INT, QCBATCH_SEQ_INT, QCSTATUS_INT,
            // UNMATCHEDRULE_VCHR, REASON_VCHR, PROCESS_VCHR,
            // SUMMARY_VCHR, REPORT_DAT, REPORTOR_ID_CHR, STATUS_INT,
            // MODIFY_DAT

            System.Data.IDataParameter[] objODPArr = clsPublicSvc.m_objConstructIDataParameterArr(
                p_intSeq,
                p_objQCReport.m_intQCBatchSeq,
                (int)p_objQCReport.m_enmQCControlStatus,
                p_objQCReport.m_strUnmatchedRule,
                p_objQCReport.m_strReason,
                p_objQCReport.m_strProcess,
                p_objQCReport.m_strSummary,
                DBAssist.ToObject(p_objQCReport.m_dtReport),
                p_objQCReport.m_strReportorId,
                (int)p_objQCReport.m_enmStatus,
                p_objQCReport.m_dtModify
                );
            return(objODPArr);
        }
Beispiel #28
0
 public clsQCDailyReportToolStrategy(clsLisQCReportVO objReportInfo, clsLisQCBatchVO objBaseInfo)
 {
     m_mthInit();
     this.m_objReportInfo.objReportInfo = objReportInfo;
     this.m_objReportInfo.objBaseInfo   = objBaseInfo;
 }
Beispiel #29
0
        /// <summary>
        /// m_btnSave_Click
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void m_btnSave_Click(object sender, EventArgs e)
        {
            //long lngRes = 0;
            //clsLisQCReportVO var = null;

            //if (this.m_blnNew)
            //{//新增
            //    var = new clsLisQCReportVO();
            //    this.m_mthBindControlValueToObj(var);
            //    var.m_intSeq = DBAssist.NullInt;
            //    var.m_intQCBatchSeq = this.m_intQCBatchSeq;
            //    var.m_enmStatus = enmQCStatus.Natrural;

            //    lngRes = clsTmdQCReportSmp.s_object.m_lngInsert(var);
            //    if (lngRes > 0)
            //    {
            //        this.m_objReport = var;
            //        this.m_blnNew = false;
            //    }
            //}
            //else
            //{//修改
            //    var = new clsLisQCReportVO();
            //    this.m_objReport.m_mthCopyTo(var);
            //    this.m_mthBindControlValueToObj(var);

            //    lngRes = clsTmdQCReportSmp.s_object.m_lngUpdate(var);
            //    if (lngRes > 0)
            //    {
            //        var.m_mthCopyTo(this.m_objReport);
            //    }
            //}
            //if (lngRes <= 0)
            //{
            //    clsCommonDialog.m_mthShowDBError();
            //    return;
            //}
            //this.m_blnOK = true;
            //this.Close();

            long num = 0L;

            if (this.m_blnNew)
            {
                if (this.m_blIsDate)
                {
                    clsLisQCReportVO QCReportVO = new clsLisQCReportVO();
                    this.m_mthBindControlValueToObj(QCReportVO);
                    QCReportVO.m_intSeq         = -2147483648;
                    QCReportVO.m_intQCBatchSeq  = this.m_intQCBatchSeq;
                    QCReportVO.m_enmStatus      = enmQCStatus.Natrural;
                    QCReportVO.m_intReportStats = 0;
                    num = this.m_objDomain.m_lngInsertQCReport(QCReportVO, out QCReportVO.m_intSeq);
                    if (num > 0L)
                    {
                        this.m_objReport = QCReportVO;
                        this.m_blnNew    = false;
                    }
                }
                else
                {
                    clsLisQCReportVO QCReportVO = new clsLisQCReportVO();
                    this.m_mthBindControlValueToObj(QCReportVO);
                    QCReportVO.m_intSeq         = -2147483648;
                    QCReportVO.m_intQCBatchSeq  = this.m_intQCBatchSeq;
                    QCReportVO.m_enmStatus      = enmQCStatus.Natrural;
                    QCReportVO.m_intReportStats = 1;
                    num = this.m_objDomain.m_lngInsertQCReport(QCReportVO, out QCReportVO.m_intSeq);
                    if (num > 0L)
                    {
                        this.m_objReport = QCReportVO;
                        this.m_blnNew    = false;
                    }
                }
            }
            else
            {
                clsLisQCReportVO QCReportVO = new clsLisQCReportVO();
                this.m_objReport.m_mthCopyTo(QCReportVO);
                this.m_mthBindControlValueToObj(QCReportVO);
                QCReportVO.m_intReportStats = this.m_objReport.m_intReportStats;
                num = this.m_objDomain.m_lngUpdateQCReport(QCReportVO);
                if (num > 0L)
                {
                    QCReportVO.m_mthCopyTo(this.m_objReport);
                }
            }
            if (num <= 0L)
            {
                clsCommonDialog.m_mthShowDBError();
            }
            else
            {
                this.m_blnOK = true;
                this.Close();
            }
        }
Beispiel #30
0
        public long m_lngInsertQCReport(IPrincipal p_objPrincipal, clsLisQCReportVO p_objQCReport, out int p_intSeq)
        {
            long num = 0L;

            p_intSeq = -1;
            clsPrivilegeHandleService handSvc = new clsPrivilegeHandleService();

            num = handSvc.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.LIS.clsQCBusiness_Serv", "m_lngInsertQCReport");
            long result;
            clsHRPTableService svc = new clsHRPTableService();

            if (num <= 0L)
            {
                result = -1L;
            }
            else
            {
                try
                {
                    num = 0L;
                    num = svc.m_lngGenerateNewID("T_OPR_LIS_QCREPORT", "QCREPORT_SEQ_INT", out p_intSeq);
                    if (num <= 0L)
                    {
                        result = -1L;
                        return(result);
                    }
                    num = 0L;

                    p_objQCReport.m_dtModify = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
                    IDataParameter[] insertDataParameterArr = this.GetInsertDataParameterArr(p_objQCReport, p_intSeq);

                    long num2 = -1L;
                    num = 0L;
                    string Sql = @"insert into t_opr_lis_qcreport
                                                  (qcreport_seq_int,
                                                   qcbatch_seq_int,
                                                   qcstatus_int,
                                                   unmatchedrule_vchr,
                                                   reason_vchr,
                                                   process_vchr,
                                                   summary_vchr,
                                                   report_dat,
                                                   reportor_id_chr,
                                                   status_int,
                                                   modify_dat,
                                                   report_stats_int)
                                                values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ";

                    num = svc.lngExecuteParameterSQL(Sql, ref num2, insertDataParameterArr);

                    if (num > 0L)
                    {
                        p_objQCReport.m_intSeq = p_intSeq;
                    }
                    else
                    {
                        p_intSeq = -1;
                    }
                }
                catch (Exception objEx)
                {
                    new clsLogText().LogError(objEx);
                }
                finally
                {
                    svc.Dispose();
                }
                result = num;
            }
            return(result);
        }