예제 #1
0
        private void frmStorageExam_FormClosing(object sender, FormClosingEventArgs e)
        {
            frmMakeOutStorageOrder frmStorageExam = sender as frmMakeOutStorageOrder;

            if (frmStorageExam.m_lngMainSEQ > 0)
            {
                //((clsCtl_AskForMedManage)this.objController).m_mthExamAskInfo(3);
                clsMS_OutStorage_VO vo       = ((clsCtl_MakeOutStorageOrder)frmStorageExam.objController).m_objCurrentMain;
                DataTable           dtSource = (DataTable)this.m_dgvOutStorageMain.DataSource;
                DataRow             TempRow;
                TempRow = dtSource.NewRow();
                TempRow["SERIESID_INT"]       = vo.m_lngSERIESID_INT;
                TempRow["askdate_dat"]        = vo.m_dtmASKDATE_DAT;
                TempRow["askstatus_int"]      = 3;
                TempRow["askstatusname"]      = "药库审核";
                TempRow["askerid_chr"]        = vo.m_strASKERID_CHR;
                TempRow["askername"]          = vo.m_strASKERName;
                TempRow["askdept_chr"]        = vo.m_strASKDEPT_CHR;
                TempRow["askdeptname"]        = vo.m_strASKDEPTName;
                TempRow["EXPORTDEPT_CHR"]     = vo.m_strEXPORTDEPT_CHR;
                TempRow["storagename"]        = vo.m_strEXPORTDEPTName;
                TempRow["askid_vchr"]         = vo.m_strASKID_VCHR;
                TempRow["outstorageid_vchr"]  = vo.m_strOUTSTORAGEID_VCHR;
                TempRow["comment_vchr"]       = vo.m_strCOMMENT_VCHR;
                TempRow["outstoragedate_dat"] = vo.m_dtmOutStorageDate;
                TempRow["examerid_chr"]       = vo.m_strEXAMERID_CHR;
                TempRow["examername"]         = vo.m_strEXAMERName;
                TempRow["examdate_dat"]       = vo.m_dtmEXAMDATE_DAT;
                TempRow["askseriesid_int"]    = frmStorageExam.m_lngAskSeq;
                dtSource.Rows.Add(TempRow);
                dtSource.AcceptChanges();
                if (dtSource.Rows.Count > 0)
                {
                    this.m_dgvOutStorageMain.Rows[dtSource.Rows.Count - 1].Selected = true;
                    this.m_dgvOutStorageMain.CurrentCell = this.m_dgvOutStorageMain.Rows[dtSource.Rows.Count - 1].Cells["m_txtOutStorageid"];
                }
                this.m_btnReturn.PerformClick();
            }
        }
예제 #2
0
        private void m_btnStorageExam_Click(object sender, EventArgs e)
        {
            if (this.tabControl1.SelectedIndex == 1 || this.m_dgvAskMedMain.SelectedRows.Count == 0)
            {
                if (this.tabControl1.SelectedIndex == 1)
                {
                    DialogResult dr = MessageBox.Show("你当前选择的是药库出库单页面,是否切换到药房请领单页面?", "药房请领提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                    if (dr == DialogResult.Yes)
                    {
                        this.tabControl1.SelectedIndex = 0;
                    }
                    else
                    {
                        if (m_dgvAskMedMain.Rows.Count <= 0)
                        {
                            return;
                        }
                        if (MessageBox.Show("是否打印明细信息", "药房请领提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                        {
                            ((clsCtl_AskForMedManage)this.objController).m_mthPrint();
                        }
                    }
                }
                else if (this.m_dgvAskMedMain.SelectedRows.Count == 0)
                {
                    MessageBox.Show("请先选择一张要进行药库审核的药房请领单!", "药房请领提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                return;
            }
            string m_strStatus = string.Empty;// this.m_dgvAskMedMain.SelectedRows[0].Cells["m_txtStatus"].Value.ToString().Trim();
            long   lngSeq      = Convert.ToInt64(this.m_dgvAskMedMain.SelectedRows[0].Cells["m_txtSeq"].Value);

            ((clsCtl_AskForMedManage)objController).m_lngGetAskStatus(lngSeq, out m_strStatus);
            if (m_strStatus != "提交")
            {
                if (m_strStatus == "新制")
                {
                    MessageBox.Show("该请领单还没有提交,不能进行药库审核!", "药房请领提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
                else if (m_strStatus == "药库审核")
                {
                    MessageBox.Show("该请领单药库已经审核,不能再进行药库审核!", "药房请领提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
                else if (m_strStatus == "药房审核")
                {
                    MessageBox.Show("该请领单药房已经审核,不能再进行药库审核!", "药房请领提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
            }
            frmMakeOutStorageOrder frmStorageExam = new frmMakeOutStorageOrder();

            frmStorageExam.m_dtbMedicineInfo = clsPub.m_dtMedicineInfo;
            frmStorageExam.FormClosing      += new FormClosingEventHandler(frmStorageExam_FormClosing);
            frmStorageExam.Text                         += "{" + this.m_dgvAskMedMain.SelectedRows[0].Cells["m_txtExportDeptName"].Value.ToString().Trim() + "}";
            frmStorageExam.Tag                           = this.m_dgvAskMedMain.SelectedRows[0].Cells["m_txtExportDept"].Value.ToString().Trim();
            frmStorageExam.AccessibleName                = this.m_dgvAskMedMain.SelectedRows[0].Cells["m_txtExportDeptName"].Value.ToString().Trim();
            frmStorageExam.m_txtApplyDept.Text           = this.m_dgvAskMedMain.SelectedRows[0].Cells["m_txtAskDeptName"].Value.ToString().Trim();
            frmStorageExam.m_txtApplyDept.AccessibleName = this.m_dgvAskMedMain.SelectedRows[0].Cells["m_txtDeptid"].Value.ToString().Trim();
            frmStorageExam.m_txtAskBillNo.Text           = this.m_dgvAskMedMain.SelectedRows[0].Cells["m_txtBillNo"].Value.ToString().Trim();
            frmStorageExam.m_lngAskSeq                   = Convert.ToInt64(this.m_dgvAskMedMain.SelectedRows[0].Cells["m_txtSeq"].Value);
            frmStorageExam.m_strStorageID                = frmStorageExam.Tag.ToString();
            frmStorageExam.m_blnNew                      = true;
            frmStorageExam.Show();
        }