Exemplo n.º 1
0
        public clsLisQCBatchVO GetQCBatchSet()
        {
            clsLisQCBatchVO temp = new clsLisQCBatchVO();

            if (m_objBatchSet != null)
            {
                m_objBatchSet.m_mthCopyTo(temp);
            }
            return(temp);
        }
Exemplo n.º 2
0
        public void UpdateSet(clsLisQCBatchVO p_objSet)
        {
            if (this.IsNull)
            {
                return;
            }
            if (p_objSet != null)
            {
                if (!p_objSet.m_mthEquals(this.m_objBatchSet))
                {
                    p_objSet.m_mthCopyTo(this.m_objBatchSet);
                    this.m_strBrokenRules = string.Empty;

                    if (this.SetChanged != null)
                    {
                        SetChanged(this, null);
                    }
                }
            }
        }
Exemplo n.º 3
0
        private void m_cmdConfirm_Click(object sender, EventArgs e)
        {
            long lngRes = 0;

            if (!this.m_blnCheckNum())
            {
                return;
            }
            this.m_mthConstructVO();

            if (string.IsNullOrEmpty(objQCBatch.m_strSampleLotNo))
            {
                MessageBox.Show("请输入质控批号!", "iCare");
                return;
            }

            int iSaveType = 1;

            if (this.objQCBatch.m_strCheckItemId == null ||
                this.objQCBatch.m_strCheckItemId == "")
            {
                if (string.IsNullOrEmpty(objQCBatch.m_strDeviceId))
                {
                    MessageBox.Show("请选择要做质控的仪器或项目", "iCare");
                    return;
                }
                if (M_blnCanReturnArr)
                {
                    clsLISCheckItemNode[] objArr = null;
                    clsTmdQCLisSmp.s_object.m_lngGetDeviceQCCheckItemByID(objQCBatch.m_strDeviceId, out objArr);
                    if (objArr == null || objArr.Length <= 0)
                    {
                        MessageBox.Show("请选设置该仪器的质控项目!", "iCare");
                        return;
                    }

                    objQCBatchArr = new clsLisQCBatchVO[objArr.Length];
                    clsLisQCBatchVO objTemp = null;
                    for (int index = 0; index < objArr.Length; index++)
                    {
                        objTemp = new clsLisQCBatchVO();
                        objQCBatch.m_mthCopyTo(objTemp);
                        objTemp.m_strCheckItemId   = objArr[index].strID;
                        objTemp.m_strCheckItemName = objArr[index].strName;

                        objQCBatchArr[index] = objTemp;
                    }

                    iSaveType = 2;
                }
                else
                {
                    MessageBox.Show("请选择要做质控的项目", "iCare");
                    return;
                }
            }
            if (iSaveType == 2)
            {
                lngRes = clsTmdQCBatchSmp.s_object.m_lngInsertArr(ref objQCBatchArr);
            }
            else
            {
                if (m_txtQCBatchSeq.Text == string.Empty)
                {
                    lngRes = clsTmdQCBatchSmp.s_object.m_lngInsert(this.objQCBatch);
                }
                else
                {
                    lngRes = clsTmdQCBatchSmp.s_object.m_lngUpdate(this.objQCBatch);
                }
            }

            if (lngRes <= 0)
            {
                clsCommonDialog.m_mthShowDBError();
            }
            else
            {
                if (iSaveType != 2)
                {
                    objQCBatchArr = new clsLisQCBatchVO[] { objQCBatch };
                }

                this.DialogResult = DialogResult.OK;
                this.Close();
            }

            //if (this.objQCBatch.m_strCheckItemId == null ||
            //    this.objQCBatch.m_strCheckItemId == "")
            //{
            //    MessageBox.Show("请选择要做质控的项目", "iCare");
            //    return;
            //}

            //if (m_txtQCBatchSeq.Text == string.Empty)
            //{
            //    lngRes = clsTmdQCBatchSmp.s_object.m_lngInsert(this.objQCBatch);
            //}
            //else
            //{
            //    lngRes = clsTmdQCBatchSmp.s_object.m_lngUpdate(this.objQCBatch);
            //}
            //if (lngRes <= 0)
            //{
            //    clsCommonDialog.m_mthShowDBError();
            //}
            //else
            //{
            //    this.DialogResult = DialogResult.OK;
            //    this.Close();
            //}
        }