Пример #1
0
        private void m_btnNew_Click(object sender, EventArgs e)
        {
            frmAskForMedDetail frmDetail = new frmAskForMedDetail();

            //frmDetail.frmMain = this;
            frmDetail.ShowDialog();
        }
Пример #2
0
        private void m_dgvMain_DoubleClick(object sender, EventArgs e)
        {
            if (this.m_dgvMain.CurrentCell == null)
            {
                return;
            }
            m_intSeleRowIndex = this.m_dgvMain.CurrentCell.RowIndex;
            frmAskForMedDetail frmDetail = new frmAskForMedDetail();

            frmDetail.m_btnNext.Enabled = false;
            //  frmDetail.frmMain = this;
            frmDetail.IsCanModify = this.m_dgvMain.Rows[this.m_dgvMain.CurrentCell.RowIndex].Cells["m_txtStatus"].Value.ToString() == "新制" ? true : false;

            frmDetail.m_dtApplyMedicine           = (DataTable)this.m_dgvDetail.DataSource;
            frmDetail.m_lngMainSEQ                = Convert.ToInt64(this.m_dgvMain.Rows[this.m_dgvMain.CurrentCell.RowIndex].Cells["m_txtSeq"].Value);
            frmDetail.m_cboAskDept.Text           = this.m_dgvMain.Rows[this.m_dgvMain.CurrentCell.RowIndex].Cells["m_txtAskDeptName"].Value.ToString();
            frmDetail.m_cboAskDept.AccessibleName = this.m_dgvMain.Rows[this.m_dgvMain.CurrentCell.RowIndex].Cells["m_txtDeptid"].Value.ToString();
            frmDetail.m_txtAskBillNo.Text         = this.m_dgvMain.Rows[this.m_dgvMain.CurrentCell.RowIndex].Cells["m_txtBillNo"].Value.ToString();
            frmDetail.m_datApplyDate.Value        = Convert.ToDateTime(this.m_dgvMain.Rows[this.m_dgvMain.CurrentCell.RowIndex].Cells["m_txtAskDate"].Value.ToString());
            frmDetail.m_txtAsker.Text             = this.m_dgvMain.Rows[this.m_dgvMain.CurrentCell.RowIndex].Cells["m_txtAskName"].Value.ToString();
            frmDetail.m_txtAsker.Tag              = this.m_dgvMain.Rows[this.m_dgvMain.CurrentCell.RowIndex].Cells["m_txtAskerid"].Value.ToString();
            frmDetail.m_txtComment.Text           = this.m_dgvMain.Rows[this.m_dgvMain.CurrentCell.RowIndex].Cells["m_txtComment"].Value.ToString();
            frmDetail.FormClosed += new FormClosedEventHandler(frmDetail_FormClosed);
            frmDetail.ShowDialog();
        }