/// <summary> /// 构造函数 /// </summary> public clsCtl_StockPlan() { m_objDomain = new clsDcl_StockPlan(); }
/// <summary> /// 审核药品信息 /// </summary> /// <param name="p_drCommit">审核的行</param> internal void m_mthCommitMedicine(out DataRow[] p_drCommit) { p_drCommit = null; if (!m_objViewer.m_blnIsAdmin) { MessageBox.Show("当前用户没有药库管理权限,不能审核", "采购计划", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } List <DataRow> lstCheck = new List <DataRow>(); 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 = ((DataRowView)m_objViewer.m_dgvMainInfo.Rows[iSe].DataBoundItem).Row; if (drCheck["STATE_INT"].ToString() == "1") { lstCheck.Add(drCheck); } } } DataRow[] drNew = lstCheck.ToArray(); if (drNew == null || drNew.Length == 0) { MessageBox.Show("没有需审核的采购计划信息", "采购计划", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } try { long lngRes = 0; long lngSEQ = 0; clsDcl_StockPlan objSTDomain = new clsDcl_StockPlan(); bool blnSaveComplete = true; DateTime dtmNow = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); for (int iRow = 0; iRow < drNew.Length; iRow++) { lngSEQ = Convert.ToInt64(drNew[iRow]["SERIESID_INT"]); lngRes = m_objDomain.m_lngCommitStockPlan(lngSEQ, m_objViewer.LoginInfo.m_strEmpID, dtmNow); if (lngRes <= 0) { blnSaveComplete = false; break; } } if (blnSaveComplete) { p_drCommit = drNew; System.Windows.Forms.MessageBox.Show("审核完成", "采购计划", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Information); } else { System.Windows.Forms.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); System.Windows.Forms.MessageBox.Show("审核失败", "采购计划", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error); } }