private void m_cmdInitialData_Click(object sender, EventArgs e) { frmInitialInStorageWithdraw frmInitial = new frmInitialInStorageWithdraw(m_strStorageID); frmInitial.FormClosed += new FormClosedEventHandler(frmInitial_FormClosed); frmInitial.ShowDialog(); }
private void m_mthModifyMedicineWithdraw() { string strStorageID = string.Empty; string strInStorageID = string.Empty; if (m_dtbMedicineInnerWithdrawDetail.Rows.Count > 0) { //if (!m_blnIsAdmin) //{ // MessageBox.Show("当前用户没有药库管理权限!不能修改", "药品内退", MessageBoxButtons.OK, MessageBoxIcon.Error); // return; //} int intStatus = 0; int intRowIndex = 0; bool blnIsInitialWithdraw = ((clsCtl_InMedicineWithdraw)objController).m_blnIsInitialWithdraw(); if (blnIsInitialWithdraw)//选中表单为内退初始化单据 { clsMS_InStorage_VO objMain = null; clsMS_InStorageDetail_VO[] objSubVO = null; ((clsCtl_InMedicineWithdraw)objController).m_mthModifyInitialWithdraw(out objMain, out objSubVO); if (objMain != null && objSubVO != null) { frmInitialInStorageWithdraw frmInitial = new frmInitialInStorageWithdraw(m_strStorageID, objMain, objSubVO); frmInitial.FormClosed += new FormClosedEventHandler(frmInitial_FormClosed); int intRow = m_dgvMainInfo.CurrentRow.Index; frmInitial.m_strMakName = m_dgvMainInfo.Rows[intRow].Cells["m_dgvtxtMakerName"].Value.ToString(); frmInitial.ShowDialog(); } } else { clsMS_InStorage_VO objMain = null; clsMS_InStorageDetail_VO[] objSubArr = null; ((clsCtl_InMedicineWithdraw)objController).m_mthModifySelected(out objMain, out objSubArr); if (objMain == null) { return; } int intSelectedSubRow = 0; if ((m_dtbMedicineInnerWithdraw != null) && (m_dtbMedicineInnerWithdraw.Rows.Count > 0)) { intSelectedSubRow = m_dgvMainInfo.CurrentRow.Index; } intRowIndex = m_dgvMainInfo.CurrentRow.Index; string p_strReturnDept = m_dtbMedicineInnerWithdraw.Rows[intRowIndex]["deptname_vchr"].ToString(); string p_strReturnDeptID = m_dtbMedicineInnerWithdraw.Rows[intRowIndex]["returndept_chr"].ToString(); frmInStorageMedicineWithdrawDetail frmModifyMedicineWithdraw = new frmInStorageMedicineWithdrawDetail(p_strReturnDeptID, p_strReturnDept, ref m_dtbMedicineInnerWithdraw, ref m_dtbMedicineInnerWithdrawDetail, m_strStorageID, m_strStoreRoomName, objMain, objSubArr, intSelectedSubRow); frmModifyMedicineWithdraw.ShowDialog(); m_mthGetDetailData(); } } }