Exemple #1
0
        /// <summary>
        /// 生成
        /// </summary>
        internal void m_mthGenerate()
        {
            if (m_objViewer.m_dgvDrugLimit.CurrentCell.RowIndex == -1)
            {
                return;
            }
            if (dtbResult.Rows.Count <= 0)
            {
                return;
            }
            DataTable dtbSelected = dtbResult.Clone();

            dtbResult.PrimaryKey = new DataColumn[] { dtbResult.Columns["medicineid_chr"] };
            DataRow drSelect = null;

            for (int i1 = 0; i1 < m_objViewer.m_dgvDrugLimit.Rows.Count; i1++)
            {
                if (m_objViewer.m_dgvDrugLimit[0, i1].Value.ToString() == "T")
                {
                    drSelect = dtbResult.Rows.Find(m_objViewer.m_dgvDrugLimit["medicineid_chr", i1].Value);
                    dtbSelected.Rows.Add(drSelect.ItemArray);
                }
            }

            if (dtbSelected.Rows.Count > 0)
            {
                frmInStorageMakeOrder objMakeOrder = new frmInStorageMakeOrder();
                objMakeOrder.m_btnNext.Enabled = false;
                objMakeOrder.IsCanModify       = true;
                objMakeOrder.Show();
                objMakeOrder.SetDetail(dtbSelected);
            }
        }
Exemple #2
0
        private void m_btnNew_Click(object sender, EventArgs e)
        {
            frmInStorageMakeOrder objMakeOrder = new frmInStorageMakeOrder();

            objMakeOrder.m_blnIsHospital = m_blnIsHospital;
            objMakeOrder.frmMain         = this;
            objMakeOrder.FormClosing    += new FormClosingEventHandler(objMakeOrder_FormClosing1);
            objMakeOrder.Show();
        }
Exemple #3
0
        private void m_dgvMain_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (this.m_dgvMain.CurrentCell == null || this.m_dgvMain.CurrentCell.RowIndex == -1)
            {
                return;
            }
            frmInStorageMakeOrder objMakeOrder = new frmInStorageMakeOrder();

            objMakeOrder.m_blnIsHospital = m_blnIsHospital;
            objMakeOrder.frmMain         = this;
            //objMakeOrder.m_btnNext.Enabled = false;
            objMakeOrder.m_intFormType = Convert.ToInt16(this.m_dgvMain.Rows[this.m_dgvMain.CurrentCell.RowIndex].Cells["m_txtFormType"].Value);
            objMakeOrder.m_lngMainSEQ  = Convert.ToInt64(this.m_dgvMain.Rows[this.m_dgvMain.CurrentCell.RowIndex].Cells["m_txtSeq"].Value);
            ((clsCtl_InStorage)this.objController).m_lngCheckStatus(0, objMakeOrder.m_lngMainSEQ, out m_intStatus);
            objMakeOrder.IsCanModify = m_intStatus == 1 ? true : false;
            //20080604:如果单据是新制的情况下,且单据类型是3、4、6(3、药房借调(来源部门是其它药房) 4、科室借调(来源部门除了药房以外的部门)、6药库出给药房),
            //单据中除了入库类型允许修改,其它内容一律不允许修改(包括数量)。
            //杨镇伟修改:将原先的3,4,6状态修改为3,6
            if ((objMakeOrder.m_intFormType == 3 || objMakeOrder.m_intFormType == 6) && m_intStatus == 1)
            {
                objMakeOrder.m_intCommitStatus = 2;
            }
            else if (m_intStatus == 2 || m_intStatus == 3)
            {
                objMakeOrder.m_intCommitStatus = 1;
            }

            objMakeOrder.m_datMakeDate.Value          = Convert.ToDateTime(m_dgvMain.Rows[this.m_dgvMain.CurrentCell.RowIndex].Cells["m_txtAskDate"].Value);
            objMakeOrder.m_txtMaker.Text              = m_dgvMain.Rows[this.m_dgvMain.CurrentCell.RowIndex].Cells["m_txtMakeName"].Value.ToString();
            objMakeOrder.m_txtMaker.Tag               = m_dgvMain.Rows[this.m_dgvMain.CurrentCell.RowIndex].Cells["m_txtMakeid"].Value.ToString();
            objMakeOrder.m_cboStatus.Text             = m_dgvMain.Rows[this.m_dgvMain.CurrentCell.RowIndex].Cells["TYPENAME_VCHR"].Value.ToString();
            objMakeOrder.m_cboStatus.AccessibleName   = m_dgvMain.Rows[this.m_dgvMain.CurrentCell.RowIndex].Cells["TYPECODE_VCHR"].Value.ToString();
            objMakeOrder.m_txtFromDept.Text           = Convert.ToString(m_dgvMain.Rows[this.m_dgvMain.CurrentCell.RowIndex].Cells["m_txtFromDept"].Value);
            objMakeOrder.m_txtFromDept.AccessibleName = Convert.ToString(m_dgvMain.Rows[this.m_dgvMain.CurrentCell.RowIndex].Cells["m_txtFromDeptid"].Value);
            objMakeOrder.m_cboMedStore.Text           = Convert.ToString(m_dgvMain.Rows[this.m_dgvMain.CurrentCell.RowIndex].Cells["m_txtMedStoreName"].Value);
            objMakeOrder.m_cboMedStore.AccessibleName = Convert.ToString(m_dgvMain.Rows[this.m_dgvMain.CurrentCell.RowIndex].Cells["m_txtMedStoreid"].Value);
            //m_strBillID = Convert.ToString(m_dgvMain.Rows[this.m_dgvMain.CurrentCell.RowIndex].Cells["m_txtBillNo"].Value);
            objMakeOrder.m_txtBillId.Text      = Convert.ToString(m_dgvMain.Rows[this.m_dgvMain.CurrentCell.RowIndex].Cells["m_txtBillNo"].Value);
            objMakeOrder.m_txtComment.Text     = Convert.ToString(m_dgvMain.Rows[this.m_dgvMain.CurrentCell.RowIndex].Cells["m_txtComment"].Value);
            objMakeOrder.m_dtInStorageMedicine = (DataTable)this.m_dgvDetail.DataSource;
            objMakeOrder.FormClosing          += new FormClosingEventHandler(objMakeOrder_FormClosing1);
            objMakeOrder.Show();
        }