Exemplo n.º 1
0
        /// <summary>
        /// 获取当前主记录
        /// </summary>
        /// <param name="p_drmain">数据</param>
        /// <returns></returns>
        private clsDS_Check_VO GetObjMain(DataRow p_drmain)
        {
            if (p_drmain == null)
            {
                return(null);
            }
            clsDS_Check_VO objMain = new clsDS_Check_VO();

            objMain.m_dtmASKDATE_DAT = Convert.ToDateTime(p_drmain["askdate_dat"]);

            //switch (p_drmain["status_int"].ToString())
            //{
            //    case "删除":
            //        objMain.m_intSTATUS_INT = 0;
            //        break;
            //    case "新制":
            //        objMain.m_intSTATUS_INT = 1;
            //        break;
            //    case "审核":
            //        objMain.m_intSTATUS_INT = 2;
            //        break;
            //    case "入账":
            //        objMain.m_intSTATUS_INT = 3;
            //        break;
            //}

            objMain.m_strDRUGSTOREID_CHR = m_objViewer.m_strStoreID;
            objMain.m_strASKERID_CHR     = p_drmain["askerid_chr"].ToString();
            objMain.m_strASKERNAME_VCHR  = p_drmain["askername"].ToString();
            objMain.m_lngSERIESID_INT    = Convert.ToInt64(p_drmain["seriesid_int"]);
            objMain.m_dtmCHECKDATE_DAT   = Convert.ToDateTime(p_drmain["checkdate_dat"]);
            objMain.m_strCHECKID_CHR     = p_drmain["checkid_chr"].ToString();
            m_objDomain.m_lngCheckStatus(2, objMain.m_lngSERIESID_INT, out objMain.m_intSTATUS_INT);
            return(objMain);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 保存盘点
        /// </summary>
        /// <param name="p_objMain">主表记录</param>
        /// <param name="p_objModifyDetaiArr">修改过的盘点记录</param>
        /// <param name="p_objNewDetailArr">新增的盘点记录</param>
        /// <param name="p_strEmpID">员工ID</param>
        /// <param name="p_strStorageID">仓库ID</param>
        /// <param name="p_blnIsAddNew">是否新增</param>
        /// <param name="p_blnIsHospital">是否住院药房</param>
        /// <param name="p_strCommit">审核流程</param>
        /// <param name="p_lngNewSubSEQArr">新增盘点记录明细序列</param>
        /// <returns></returns>
        internal long m_lngSaveStorageCheck(ref clsDS_Check_VO p_objMain, clsDS_StorageCheckDetail_VO[] p_objModifyDetaiArr, clsDS_StorageCheckDetail_VO[] p_objNewDetailArr,
                                            string p_strEmpID, string p_strStorageID, bool p_blnIsAddNew, bool p_blnIsHospital, string p_strCommit, out long[] p_lngNewSubSEQArr)
        {
            long lngRes = 0;

            com.digitalwave.iCare.middletier.HIS.clsDrugStoreCheck_SVC objSvc =
                (com.digitalwave.iCare.middletier.HIS.clsDrugStoreCheck_SVC)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(com.digitalwave.iCare.middletier.HIS.clsDrugStoreCheck_SVC));
            lngRes = objSvc.m_lngSaveStorageCheck(objPrincipal, ref p_objMain, p_objModifyDetaiArr, p_objNewDetailArr, p_strEmpID, p_strStorageID, p_blnIsAddNew, p_blnIsHospital, p_strCommit, out p_lngNewSubSEQArr);
            return(lngRes);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 显示明细窗体
        /// </summary>
        /// <param name="intShowType">窗体显示类型0:新制,1:修改</param>
        public void m_mthFrmDetail(int intShowType)
        {
            frmDrugStoreCheck_Detail frmDetail = new frmDrugStoreCheck_Detail(m_objViewer.m_strStoreID, m_objViewer.m_strStoreDeptID);

            frmDetail.m_blnIsHospital = m_objViewer.m_blnIsHospital;
            if (intShowType == 1)
            {
                if (m_objViewer.m_dgvMain.SelectedRows.Count == 0)
                {
                    MessageBox.Show("请先选择一行盘点信息", "药品盘点", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                DataRowView    drCurrent = m_objViewer.m_dgvMain.SelectedRows[0].DataBoundItem as DataRowView;
                clsDS_Check_VO objMain   = GetObjMain(drCurrent.Row);
                frmDetail.m_objMain     = objMain;
                m_objViewer.m_strBillNo = objMain.m_strCHECKID_CHR;

                DataView dv = dtbStoreCheck_detail.DefaultView;
                dv.Sort       = "checkmedicineorder_chr,assistcode_chr,medicineid_chr";
                dtbStoreCheck = dv.ToTable();
                DataTable dtbDetail = dtbStoreCheck_detail.Copy();
                DataTable dtbTrue   = dtbDetailTrue.Copy();
                frmDetail.dtbDrugCheck_detail     = dtbDetail;
                frmDetail.dtbDrugCheck_TrueDetail = dtbTrue;
            }
            else
            {
                frmDetail.m_objMain           = null;
                frmDetail.dtbDrugCheck_detail = new DataTable();
            }
            frmDetail.intShowType  = intShowType;
            frmDetail.m_strStoreID = this.m_objViewer.m_strStoreID;
            if (m_objViewer.m_intCheckMode == 0 || intShowType == 0)
            {
                frmDetail.FormClosed += new FormClosedEventHandler(frmDetail_FormClosed);
            }
            frmDetail.Show();
        }