public void m_mthFillMedType() { //this.m_objViewer.txtTypecode.m_listView.Items.Clear(); clsDcl_OutStorageDetailReport2 objTmp = new clsDcl_OutStorageDetailReport2(); DataTable dtRoom; DataTable dtVonder; DataTable dtMedType; long lngRes = objTmp.m_lngGetExptypeAndVendor(m_objViewer.m_blnForDrugStore, out dtRoom, out dtVonder, out dtMedType); DataView dtvMedType = new DataView(dtMedType); clsColumns_VO[] column2 = new clsColumns_VO[] { new clsColumns_VO("类别名称", "medicinetypename_vchr", HorizontalAlignment.Left, 145) }; this.m_objViewer.txtTypecode.m_mthInitListView(column2); if (m_objViewer.m_blnForDrugStore) { dtvMedType.RowFilter = "medicineroomid='" + this.m_objViewer.m_strDeptID + "'"; } else { dtvMedType.RowFilter = "medicineroomid='" + this.m_objViewer.m_strStorageID + "'"; } DataTable dtValue = dtvMedType.ToTable(); DataRow drTmp = dtValue.NewRow(); drTmp["medicinetypeid_chr"] = ""; drTmp["medicinetypename_vchr"] = "全部"; drTmp["medicineroomid"] = "-1"; dtValue.BeginLoadData(); dtValue.Rows.Add(drTmp); dtValue.EndLoadData(); this.m_objViewer.txtTypecode.m_dtbDataSourse = dtValue; this.m_objViewer.txtTypecode.m_mthFillData(); }
public void m_mthInit() { this.m_objViewer.dw.LibraryList = clsPublic.PBLPath; this.m_objViewer.dw.DataWindowObject = "instorage_detailreport_3yuan"; this.m_objViewer.dw.InsertRow(0); //this.m_objViewer.dw.PrintProperties.Preview = true; //this.m_objViewer.dw.PrintProperties.ShowPreviewRulers = true; clsDcl_OutStorageDetailReport2 objTmp = new clsDcl_OutStorageDetailReport2(); DataTable dtRoom; DataTable dtRoomToid = new DataTable(); DataTable dtVonder; DataTable dtMedType; long lngRes = objTmp.m_lngGetExptypeAndVendor(m_objViewer.m_blnForDrugStore, out dtRoom, out dtVonder, out dtMedType); DataTable dtVendor;//供应商 objSvc.m_lngGetVendor(out dtVendor); this.dtvMedType = new DataView(dtMedType); clsColumns_VO[] column2 = new clsColumns_VO[] { new clsColumns_VO("类别名称", "medicinetypename_vchr", HorizontalAlignment.Left, 145) }; this.m_objViewer.txtTypecode.m_mthInitListView(column2); this.m_objViewer.txtTypecode.m_dtbDataSourse = null; if (m_objViewer.m_strRoomidArr.Length > 0) { if (dtRoom.Rows.Count > 0) { dtRoomToid = dtRoom.Clone(); DataRow dr = null; int iRowCount = dtRoom.Rows.Count; int iLength = m_objViewer.m_strRoomidArr.Length; dtRoomToid.BeginLoadData(); for (int i = 0; i < iLength; i++) { for (int j = 0; j < iRowCount; j++) { dr = dtRoom.Rows[j]; if (m_objViewer.m_strRoomidArr[i].ToString().Trim() == dr["medicineroomid"].ToString().Trim()) { dtRoomToid.LoadDataRow(dr.ItemArray, true); } } } dtRoomToid.EndLoadData(); dtRoomToid.AcceptChanges(); } } clsColumns_VO[] column3 = new clsColumns_VO[] { new clsColumns_VO("库房名称", "medicineroomname", HorizontalAlignment.Left, 145) }; this.m_objViewer.txtStoreroom.m_mthInitListView(column3); if (m_objViewer.m_strRoomidArr.Length > 0) { this.m_objViewer.txtStoreroom.m_dtbDataSourse = dtRoomToid; } else { this.m_objViewer.txtStoreroom.m_dtbDataSourse = dtRoom; } this.m_objViewer.txtStoreroom.m_mthFillData(); if (m_objViewer.m_strRoomidArr.Length > 0) { DataRow drRoom = null; for (int iRow = 0; iRow < dtRoom.Rows.Count; iRow++) { drRoom = dtRoom.Rows[iRow]; if (m_objViewer.m_strRoomidArr[0].ToString().Trim() == drRoom["medicineroomid"].ToString().Trim()) { this.m_objViewer.txtStoreroom.Text = drRoom["medicineroomname"].ToString().Trim(); this.m_objViewer.txtStoreroom.Value = drRoom["medicineroomid"].ToString().Trim(); break; } } } else { this.m_objViewer.txtStoreroom.Text = dtRoom.Rows[0]["medicineroomname"].ToString().Trim(); this.m_objViewer.txtStoreroom.Value = dtRoom.Rows[0]["medicineroomid"].ToString().Trim(); } this.m_objViewer.m_dtProduct = dtVendor;// dtVonder; if (m_objViewer.m_blnForDrugStore) { DataTable dtbDept = null; m_mthGetExportDept(out dtbDept); m_objViewer.m_txtReceiveDept.m_mthInitDeptData(dtbDept); m_objViewer.m_txtReceiveDept.Visible = true; m_objViewer.m_txtReceiveDept.BringToFront(); m_objViewer.txtProduct.Visible = false; } else { m_objViewer.m_txtReceiveDept.Visible = false; m_objViewer.txtProduct.BringToFront(); m_objViewer.txtProduct.Visible = true; } m_mthGetImpExpTypeInfo(); }
/// <summary> /// 出库明细报表 /// </summary> public clsCtl_OutStorageDetailReport2() { m_objDomain = new clsDcl_OutStorageDetailReport2(); }