コード例 #1
0
        /// <summary>
        /// 获取是否审核即入帐

        /// </summary>
        /// <param name="p_blnIsImmAccount">是否审核即入帐</param>
        internal void m_mthGetIsImmAccount(out bool p_blnIsImmAccount)
        {
            clsDcl_Purchase_Detail objPDDomain = new clsDcl_Purchase_Detail();
            long lngRes = objPDDomain.m_lngGetIsImmAccount(out p_blnIsImmAccount);

            objPDDomain = null;
        }
コード例 #2
0
ファイル: clsCtl_AcceptanceCheck.cs プロジェクト: ewin66/HIS
        /// <summary>
        /// 设置员工至列表

        /// </summary>
        /// <param name="p_strSearch">搜索字符串</param>
        /// <param name="p_txtEmp">员工控件</param>
        internal void m_mthSetEmpToList(string p_strSearch, TextBox p_txtEmp)
        {
            DataTable dtbEmp = null;
            clsDcl_Purchase_Detail objDomain = new clsDcl_Purchase_Detail();
            long lngRes = objDomain.m_lngGetEMP(p_strSearch, out dtbEmp);

            if (dtbEmp == null || dtbEmp.Rows.Count == 0)
            {
                p_txtEmp.Tag = null;
            }

            if (m_ctlEMP == null)
            {
                m_ctlEMP = new ctlQueryEmployee();
                m_objViewer.Controls.Add(m_ctlEMP);
            }
            m_ctlEMP.m_mthSetTxtBase(p_txtEmp);
            m_ctlEMP.BringToFront();
            int X = p_txtEmp.Location.X;
            int Y = p_txtEmp.Location.Y - m_ctlEMP.Size.Height;

            if (Y < 0)
            {
                Y = 0;
            }

            m_ctlEMP.Location = new System.Drawing.Point(X, Y);

            m_ctlEMP.Size        = new System.Drawing.Size(p_txtEmp.Size.Width, m_objViewer.m_txtExamerID.Location.Y - Y);
            m_ctlEMP.ReturnInfo += new ReturnEmpInfo(m_ctlEMP_ReturnInfo);

            try
            {
                int                 intRowCount = dtbEmp.Rows.Count;
                DataRow             drCurrent   = null;
                List <ListViewItem> lstItems    = new List <ListViewItem>();
                for (int iRow = 0; iRow < intRowCount; iRow++)
                {
                    drCurrent = dtbEmp.Rows[iRow];
                    ListViewItem lsi = new ListViewItem(drCurrent["EMPNO_CHR"].ToString());
                    lsi.SubItems.Add(drCurrent["LASTNAME_VCHR"].ToString());
                    lsi.Tag = drCurrent;
                    lstItems.Add(lsi);
                }
                m_ctlEMP.AddRange(lstItems.ToArray());
                if (lstItems.Count == 0)
                {
                    p_txtEmp.Tag = null;
                }
                m_ctlEMP.Visible = true;
                m_ctlEMP.Focus();
            }
            catch (Exception Ex)
            {
                string strEx = Ex.Message;
            }
        }
コード例 #3
0
ファイル: frmPackConversion.cs プロジェクト: ewin66/HIS
        private void m_bgwGetPrice_DoWork(object sender, DoWorkEventArgs e)
        {
            string strMedicineID = e.Argument as string;

            if (strMedicineID == null)
            {
                return;
            }

            decimal dcmPackBuyInPrice        = 0m;
            clsDcl_Purchase_Detail objDomain = new clsDcl_Purchase_Detail();
            long lngRes = objDomain.m_lngGetLatestPackBuyInPrice(strMedicineID, out dcmPackBuyInPrice);

            e.Result = dcmPackBuyInPrice;
        }
コード例 #4
0
ファイル: clsCtl_AcceptanceCheck.cs プロジェクト: ewin66/HIS
        /// <summary>
        /// 获取最近一次的中标单位及批准文号

        /// </summary>
        /// <param name="p_strMedicineID">药品ID</param>
        /// <param name="p_strLotNO">批准文号</param>
        /// <param name="p_strBidCompanyID">中标单位</param>
        /// <returns></returns>
        internal void m_mthGetLatestBidCompany(string p_strMedicineID, out string p_strLotNO, out string p_strBidCompanyID)
        {
            clsDcl_Purchase_Detail objDomain = new clsDcl_Purchase_Detail();
            long lngRes = objDomain.m_lngGetLatestBidCompany(p_strMedicineID, out p_strLotNO, out p_strBidCompanyID);
        }
コード例 #5
0
        /// <summary>
        /// 审核出库
        /// </summary>
        /// <param name="p_drCommit">审核的行</param>
        internal void m_mthCommitOutStorage()
        {
            if (!m_objViewer.m_blnIsAdmin)
            {
                MessageBox.Show("当前用户没有药库管理权限,不能审核", "药品出库", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            List <DataRow> lstCheck    = new List <DataRow>();
            bool           blnNewState = false;

            for (int iSe = 0; iSe < m_objViewer.m_dgvMainInfo.Rows.Count; iSe++)
            {
                if (Convert.ToBoolean(m_objViewer.m_dgvMainInfo.Rows[iSe].Cells[0].Value))
                {
                    DataRow drCheck = m_objViewer.m_dtvCurrentMainVienPage1[iSe].Row;

                    clsDcl_Purchase_Detail clsDcl = new clsDcl_Purchase_Detail();
                    clsDcl.m_lngCheckBillState(2, drCheck["OUTSTORAGEID_VCHR"].ToString(), out blnNewState);
                    if (!blnNewState)
                    {
                        MessageBox.Show("已选中的出库单,包含不是新制状态的单据,请刷新后重试", "药品出库", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                        return;
                    }

                    if (drCheck["STATUS"].ToString() == "1")
                    {
                        lstCheck.Add(drCheck);
                    }
                }
            }

            if (lstCheck.Count == 0)
            {
                MessageBox.Show("请先选择需审核的药品出库信息", "药品出库", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }

            DataRow[] drNew = lstCheck.ToArray();

            if (drNew == null || drNew.Length == 0)
            {
                MessageBox.Show("没有需审核的药品出库信息", "药品出库", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }

            string strCurrentOutStorageID = string.Empty;

            try
            {
                long[] lngMainSEQ = new long[drNew.Length];
                for (int iMSeq = 0; iMSeq < drNew.Length; iMSeq++)
                {
                    lngMainSEQ[iMSeq] = Convert.ToInt64(drNew[iMSeq]["SERIESID_INT"]);
                }

                clsMS_StorageGrossForOut[] objSubArr = null;
                //List<clsMS_StorageGrossForOut> lisDetail = new List<clsMS_StorageGrossForOut>();
                long                     lngRes      = 0;
                DataTable                dtbDetail   = null;
                clsDcl_OutStorage        objOSDomain = new clsDcl_OutStorage();
                clsMS_AccountDetail_VO[] objAccount  = null;
                for (int iSEQ = 0; iSEQ < lngMainSEQ.Length; iSEQ++)
                {
                    strCurrentOutStorageID = drNew[iSEQ]["OUTSTORAGEID_VCHR"].ToString();
                    lngRes    = objOSDomain.m_lngGetOutStorageDetail(lngMainSEQ[iSEQ], out dtbDetail);
                    objSubArr = m_objGetDetail(dtbDetail);
                    if (objSubArr != null && objSubArr.Length > 0)
                    {
                        objAccount = m_objAccountDetailArr(dtbDetail, Convert.ToInt32(drNew[iSEQ]["FORMTYPE"]), strCurrentOutStorageID);
                        lngRes     = objOSDomain.m_lngCommitOutStorage(objSubArr, objAccount, m_objViewer.LoginInfo.m_strEmpID, lngMainSEQ[iSEQ], m_objViewer.m_blnIsImmAccount);

                        if (lngRes > 0)
                        {
                            m_mthUpdateUIAfterCommit(drNew[iSEQ]);
                        }
                    }
                }

                //if (lisDetail.Count > 0)
                //{
                //    clsDcl_Storage objSTDomain = new clsDcl_Storage();
                //    lngRes = objSTDomain.m_lngSubStorageDetailRealGross(lisDetail.ToArray());

                //    for (int iList = 0; iList < lisDetail.Count; iList++)
                //    {
                //        lngRes = objSTDomain.m_lngSubStorageGross(lisDetail[iList]);
                //    }

                //    if (lngRes > 0)
                //    {
                //        lngRes = objOSDomain.m_lngSetCommitUser(m_objViewer.LoginInfo.m_strEmpID, lngMainSEQ);
                //    }

                //    if (lngRes > 0)
                //    {
                //        p_drCommit = drNew;
                //    }
                //}
                objOSDomain = null;

                if (lngRes > 0)
                {
                    MessageBox.Show("审核完成", "药品出库", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Information);
                }
                else
                {
                    MessageBox.Show("审核失败", "药品出库", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
                }
            }
            catch (Exception objEx)
            {
                com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
        }
コード例 #6
0
        /// <summary>
        /// 删除出库药品信息
        /// </summary>
        internal void m_mthDeleteOutStorage()
        {
            List <long> lngCheckRowIndex = new List <long>();
            List <long> lngWrongRowIndex = new List <long>();
            bool        blnNewState      = false;

            for (int iSe = 0; iSe < m_objViewer.m_dgvMainInfo.Rows.Count; iSe++)
            {
                if (Convert.ToBoolean(m_objViewer.m_dgvMainInfo.Rows[iSe].Cells[0].Value))
                {
                    clsDcl_Purchase_Detail clsDcl = new clsDcl_Purchase_Detail();
                    clsDcl.m_lngCheckBillState(2, m_objViewer.m_dtvCurrentMainVienPage1[iSe]["OUTSTORAGEID_VCHR"].ToString(), out blnNewState);
                    if (!blnNewState)
                    {
                        MessageBox.Show("已选中的出库单,包含不是新制状态的单据,请刷新后重试", "药品出库", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                        return;
                    }

                    int intState = Convert.ToInt32(m_objViewer.m_dtvCurrentMainVienPage1[iSe]["STATUS"]);
                    if (intState == 2 || intState == 3)//已审核或已入帐

                    {
                        lngWrongRowIndex.Add(Convert.ToInt64(m_objViewer.m_dtvCurrentMainVienPage1[iSe]["SERIESID_INT"]));
                        continue;
                    }
                    lngCheckRowIndex.Add(Convert.ToInt64(m_objViewer.m_dtvCurrentMainVienPage1[iSe]["SERIESID_INT"]));
                }
            }

            if (lngWrongRowIndex.Count > 0)
            {
                DialogResult drResultQ = MessageBox.Show("部分已选择记录已审核或已入账,将不能删除,是否继续?", "药品出库", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
                if (drResultQ == DialogResult.No)
                {
                    return;
                }
            }

            if (lngCheckRowIndex.Count == 0)
            {
                MessageBox.Show("请先选择一条新制药品入库信息", "药品出库", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            DialogResult drResult = MessageBox.Show("是否删除选中记录?", "药品出库", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (drResult == DialogResult.No)
            {
                return;
            }

            clsMS_StorageGrossForOut[] objGetOutValue = m_objGetOutValue(lngCheckRowIndex.ToArray());

            clsDcl_OutStorage objOSDomain = new clsDcl_OutStorage();
            long lngRes = objOSDomain.m_lngDeleteMainOutStorage(lngCheckRowIndex.ToArray());

            objOSDomain = null;
            if (lngRes > 0)
            {
                m_mthAddAvailaGross(objGetOutValue);
                MessageBox.Show("删除成功", "药品出库", MessageBoxButtons.OK, MessageBoxIcon.Information);

                StringBuilder stbFilter = new StringBuilder(50);
                for (int iSer = 0; iSer < lngCheckRowIndex.Count; iSer++)
                {
                    stbFilter.Append(" SERIESID_INT = '");
                    stbFilter.Append(lngCheckRowIndex[iSer]);
                    stbFilter.Append("'");
                    if (iSer < lngCheckRowIndex.Count - 1)
                    {
                        stbFilter.Append(" or ");
                    }
                }
                DataRow[] drRemove = m_objViewer.m_dtbMainDataPage1.Select(stbFilter.ToString());
                if (drRemove != null && drRemove.Length > 0)
                {
                    for (int iRev = 0; iRev < drRemove.Length; iRev++)
                    {
                        m_objViewer.m_dtbMainDataPage1.Rows.Remove(drRemove[iRev]);
                    }
                }

                DataView dtvSub = m_objViewer.m_dgvSubInfo.DataSource as DataView;
                if (m_objViewer.m_dtvCurrentMainVienPage1.Count == 0 && dtvSub != null)
                {
                    dtvSub.Table.Rows.Clear();
                }
            }
            else
            {
                MessageBox.Show("删除失败", "药品出库", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }