/// <summary> /// 选择项目 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnPro_Press(object sender, EventArgs e) { try { PopPro.Groups.Clear(); PopListGroup manGroup = new PopListGroup(); PopPro.Title = "项目选择"; //List<cmdb_useman> users = _autofacConfig.assUserService.GetAll(); List <cmdb_project> pros = _autofacConfig.assProService.GetAll(); foreach (cmdb_project Row in pros) { manGroup.AddListItem(Row.name, Row.id.ToString()); } PopPro.Groups.Add(manGroup); if (btnPro.Tag != null) //如果已有选中项,则显示选中效果 { foreach (PopListItem Item in manGroup.Items) { if (Item.Value == btnPro.Tag.ToString()) { PopPro.SetSelections(Item); } } } PopPro.ShowDialog(); } catch (Exception ex) { Toast(ex.Message); } }
/// <summary> /// 选择所属区域 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnLocation_Press(object sender, EventArgs e) { try { popLocation.Groups.Clear(); //数据清空 PopListGroup poli = new PopListGroup(); popLocation.Groups.Add(poli); poli.Title = "调入区域选择"; List <AssLocation> users = autofacConfig.assLocationService.GetEnableAll(); foreach (AssLocation Row in users) { poli.AddListItem(Row.NAME, Row.LOCATIONID); } if (btnLocation.Tag != null) //如果已有选中项,则显示选中效果 { foreach (PopListItem Item in poli.Items) { if (Item.Value == btnLocation.Tag.ToString()) { popLocation.SetSelections(Item); } } } popLocation.ShowDialog(); } catch (Exception ex) { Toast(ex.Message); } }
/// <summary> /// 盘点人选择 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnManager_Press(object sender, EventArgs e) { try { popMan.Groups.Clear(); PopListGroup manGroup = new PopListGroup { Title = "盘点人选择" }; List <coreUser> users = _autofacConfig.coreUserService.GetAll(); foreach (coreUser Row in users) { manGroup.AddListItem(Row.USER_NAME, Row.USER_ID); } popMan.Groups.Add(manGroup); if (btnManager.Tag != null) //如果已有选中项,则显示选中效果 { foreach (PopListItem Item in manGroup.Items) { if (Item.Value == btnManager.Tag.ToString()) { popMan.SetSelections(Item); } } } popMan.ShowDialog(); } catch (Exception ex) { Toast(ex.Message); } }
private void btnVendor_Press(object sender, EventArgs e) { try { popVendor.Groups.Clear(); PopListGroup vendorGroup = new PopListGroup { Title = "供应商选择" }; vendorGroup.AddListItem("全部", ""); List <Vendor> vendors = _autofacConfig.vendorService.GetAll(); foreach (Vendor Row in vendors) { vendorGroup.AddListItem(Row.NAME, Row.VID.ToString()); } popVendor.Groups.Add(vendorGroup); if (btnVendor.Tag != null) //如果已有选中项,则显示选中效果 { foreach (PopListItem Item in vendorGroup.Items) { if (Item.Value == btnVendor.Tag.ToString()) { popVendor.SetSelections(Item); } } } popVendor.ShowDialog(); } catch (Exception ex) { Toast(ex.Message); } }
private void btnLocation_Press(object sender, EventArgs e) { try { PopLocation.Groups.Clear(); PopListGroup locationGroup = new PopListGroup(); List <AssLocation> locations = _autofacConfig.assLocationService.GetEnableAll(); foreach (var location in locations) { PopListItem item = new PopListItem { Value = location.LOCATIONID, Text = location.NAME }; locationGroup.Items.Add(item); } PopLocation.Groups.Add(locationGroup); if (!string.IsNullOrEmpty(btnLocation.Text)) { foreach (PopListItem row in PopLocation.Groups[0].Items) { if (row.Text == btnLocation.Text) { PopLocation.SetSelections(row); } } } PopLocation.ShowDialog(); } catch (Exception ex) { Toast(ex.Message); } }
private void btnChange_Press(object sender, EventArgs e) { try { popCurrentUser.Groups.Clear(); PopListGroup poli = new PopListGroup(); popCurrentUser.Groups.Add(poli); poli.Title = "使用者变更"; List <coreUser> users = _autofacConfig.coreUserService.GetAll(); foreach (coreUser Row in users) { poli.AddListItem(Row.USER_NAME, Row.USER_ID); } Assets assets = _autofacConfig.orderCommonService.GetAssetsByID(txtAssId1.Text); foreach (PopListItem Item in poli.Items) { if (Item.Value == assets.CURRENTUSER) { popCurrentUser.SetSelections(Item); LastUser = assets.CURRENTUSER; // ASSID = lblID.BindDataValue.ToString(); } } popCurrentUser.ShowDialog(); } catch (Exception ex) { Toast(ex.Message); } }
private void demoIconMenuView_Load(object sender, EventArgs e) { PopListGroup g1 = new PopListGroup(); g1.AddListItem("Groups"); g1.AddListItem("ColumnNum"); g1.AddListItem("ItemWidth"); g1.AddListItem("MenuGroupHeight"); g1.AddListItem("MenuItemHeight"); g1.AddListItem("ShowGroupTitle"); g1.AddListItem("ImageSizeMode"); g1.AddListItem("FontSize"); g1.AddListItem("ForeColor"); g1.AddListItem("GridLines"); g1.AddListItem("GridLinesColor"); g1.AddListItem("GroupBackColor"); g1.AddListItem("GroupFontSize"); g1.AddListItem("GroupForeColor"); g1.AddListItem("MessageWidth"); g1.AddListItem("MessageBackColor"); g1.AddListItem("MessageFontSize"); g1.AddListItem("MessageForeColor"); g1.AddListItem("ShowDialogMenu"); g1.AddListItem("ItemPress"); popList1.Groups.Add(g1); }
private void btnBOMan_Press(object sender, EventArgs e) { try { PopBOMan.Groups.Clear(); PopListGroup manGroup = new PopListGroup(); PopBOMan.Title = "出库类型选择"; manGroup.AddListItem("退货", "1"); manGroup.AddListItem("领用", "2"); // List<coreUser> users = _autofacConfig.coreUserService.GetDealInAdmin(); // foreach (coreUser Row in users) // { // manGroup.AddListItem(Row.USER_NAME, Row.USER_ID); // } PopBOMan.Groups.Add(manGroup); if (btnBOMan.Tag != null) //如果已有选中项,则显示选中效果 { foreach (PopListItem Item in manGroup.Items) { if (Item.Value == btnBOMan.Tag.ToString()) { PopBOMan.SetSelections(Item); } } } PopBOMan.ShowDialog(); } catch (Exception ex) { Toast(ex.Message); } }
/// <summary> /// 部门选择 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnDep_Press(object sender, EventArgs e) { try { popDep.Groups.Clear(); //数据清空 PopListGroup poli = new PopListGroup(); popDep.Groups.Add(poli); poli.AddListItem("全部", null); List <DepartmentDto> deps = _autofacConfig.DepartmentService.GetAllDepartment(); foreach (DepartmentDto Row in deps) { poli.AddListItem(Row.NAME, Row.DEPARTMENTID); } if (btnDep.Tag != null) //如果已有选中项,则显示选中效果 { foreach (PopListItem Item in poli.Items) { if (Item.Value == btnDep.Tag.ToString()) { popDep.SetSelections(Item); } } } popDep.ShowDialog(); } catch (Exception ex) { Toast(ex.Message); } }
//使用人 private void txtUser_TextChanged(object sender, EventArgs e) { try { popUser.Groups.Clear(); PopListGroup brandGroup = new PopListGroup { Title = "品牌型号" }; brandGroup.AddListItem("-----------------", "-1"); var brandlist = _autofacConfig.assUserService.GetAll(); foreach (var dep in brandlist) { PopListItem item = new PopListItem { Value = dep.id.ToString(), Text = dep.name }; brandGroup.Items.Add(item); } popUser.Groups.Add(brandGroup); popUser.ShowDialog(); } catch (Exception ex) { Toast(ex.Message); } }
/// <summary> /// 扫描到条码时 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void BarcodeScanner1_BarcodeScanned(object sender, BarcodeResultArgs e) { try { ConsumablesOrderRow Data = new ConsumablesOrderRow(); if (string.IsNullOrEmpty(e.error)) { CID = e.Value; } else { throw new Exception(e.error); } string[] LCData = lblLocation.Tag.ToString().Split('/'); List <ConQuantOutputDto> assList = autofacConfig.orderCommonService.GetUnUseCon(LCData[0], LCData[1], LCData[2], CID); if (assList.Count > 1) { popLocation.Groups.Clear(); PopListGroup poli = new PopListGroup(); popLocation.Groups.Add(poli); foreach (ConQuantOutputDto Row in assList) { if (Row.WAREID + "/" + Row.STID + "/" + Row.SLID != lblLocation.Tag.ToString()) { poli.AddListItem(Row.WARENAME + "/" + Row.STNAME + "/" + Row.SLNAME, Row.WAREID + "/" + Row.STID + "/" + Row.SLID); } } popLocation.ShowDialog(); } else { if (assList[0].WAREID + "/" + assList[0].STID + "/" + assList[0].SLID == lblLocation.Tag.ToString()) { throw new Exception("该资产已在目的酷我!"); } Consumables cons = autofacConfig.consumablesService.GetConsById(CID); Data.CID = CID; Data.WAREID = assList[0].WAREID; Data.STID = assList[0].STID; Data.SLID = assList[0].SLID; Data.IMAGE = cons.IMAGE; Data.QTY = 0; if (RowData.Count > 0) { RowData.Add(Data); } else { List <ConsumablesOrderRow> Datas = new List <ConsumablesOrderRow>(); Datas.Add(Data); RowData = Datas; } Bind(); } } catch (Exception ex) { Toast(ex.Message); } }
//类型 private void txtType_TextChanged(object sender, EventArgs e) { try { popType.Groups.Clear(); PopListGroup typeGroup = new PopListGroup { Title = "类型" }; var typelist = _autofacConfig.assTypeService.GetAllFirstLevel(); foreach (var dep in typelist) { PopListItem item = new PopListItem { Value = dep.id.ToString(), Text = dep.name }; typeGroup.Items.Add(item); } popType.Groups.Add(typeGroup); popType.ShowDialog(); } catch (Exception ex) { Toast(ex.Message); } }
/// <summary> /// 选择生产库 /// </summary> void readDatabase( ) { try { string[] itemList = TableToArr.tableToOrder(tableResult, "name"); popListOne.Groups.Clear( ); PopListGroup typeGroup = new PopListGroup { Title = "生产库" }; foreach (string s in itemList) { PopListItem item = new PopListItem { Text = s }; typeGroup.Items.Add(item); } popListOne.Groups.Add(typeGroup); this.popListOne.ShowDialog( ); } catch (Exception ex) { Toast(ex.Message); } }
/// <summary> /// 选择团队 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnTeam_Press(object sender, EventArgs e) { try { PopTeam.Groups.Clear(); PopListGroup manGroup = new PopListGroup(); PopTeam.Title = "团队选择"; List <cmdb_team> teams = _autofacConfig.assTeamService.GetAll(); foreach (cmdb_team Row in teams) { manGroup.AddListItem(Row.name, Row.id.ToString()); } PopTeam.Groups.Add(manGroup); if (btnTeam.Tag != null) //如果已有选中项,则显示选中效果 { foreach (PopListItem Item in manGroup.Items) { if (Item.Value == btnTeam.Tag.ToString()) { PopTeam.SetSelections(Item); } } } PopTeam.ShowDialog(); } catch (Exception ex) { Toast(ex.Message); } }
/// <summary> /// 存储类型选择 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnST_Press(object sender, EventArgs e) { try { if (btnWareHouse.Tag == null) { throw new Exception("请先选择盘点仓库!"); } //存储类型赋值 popST.Groups.Clear(); //数据清空 PopListGroup poliST = new PopListGroup(); popST.Groups.Add(poliST); List <WHStorageType> WHST = _autofacConfig.wareHouseService.GetSTByWareID(btnWareHouse.Tag.ToString()); foreach (WHStorageType Row in WHST) { poliST.AddListItem(Row.NAME, Row.STID); } if (btnST.Tag != null) //如果已有选中项,则显示选中效果 { foreach (PopListItem Item in popST.Groups[0].Items) { if (Item.Value == btnST.Tag.ToString()) { popST.SetSelections(Item); } } } popST.ShowDialog(); } catch (Exception ex) { Toast(ex.Message); } }
/// <summary> /// 选择出库类型 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnBOMan_Press(object sender, EventArgs e) { try { PopBOMan.Groups.Clear(); PopListGroup manGroup = new PopListGroup(); PopBOMan.Title = "出库类型选择"; manGroup.AddListItem("退货", "1"); manGroup.AddListItem("领用", "2"); PopBOMan.Groups.Add(manGroup); if (btnBOMan.Tag != null) //如果已有选中项,则显示选中效果 { foreach (PopListItem Item in manGroup.Items) { if (Item.Value == btnBOMan.Tag.ToString()) { PopBOMan.SetSelections(Item); } } } PopBOMan.ShowDialog(); } catch (Exception ex) { Toast(ex.Message); } }
/// <summary> /// 客户选择 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnCustomer_Press(object sender, EventArgs e) { popCustomer.Groups.Clear(); //数据清空 PopListGroup poli = new PopListGroup(); popCustomer.Groups.Add(poli); poli.Title = "销售人选择"; List <Customer> customerList = autofacConfig.customerService.GetAll(); foreach (Customer Row in customerList) { poli.AddListItem(Row.NAME, Row.CUSID.ToString()); } if (btnCustomer.Tag != null) //如果已有选中项,则显示选中效果 { foreach (PopListItem Item in poli.Items) { if (Item.Value == btnCustomer.Tag.ToString()) { popCustomer.SetSelections(Item); } } } popCustomer.ShowDialog(); }
/// <summary> /// 选择资产大类 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void tpSearch_Press(object sender, EventArgs e) { try { popType.Groups.Clear(); //数据清空 PopListGroup poli = new PopListGroup(); poli.AddListItem("全部", ""); popType.Groups.Add(poli); List <AssetsType> types = _autofacConfig.assTypeService.GetAllFirstLevel(); foreach (AssetsType Row in types) { poli.AddListItem(Row.NAME, Row.TYPEID); } if (Type != null) //如果已有选中项,则显示选中效果 { foreach (PopListItem Item in poli.Items) { if (Item.Value == Type) { popType.SetSelections(Item); } } } popType.ShowDialog(); } catch (Exception ex) { Toast(ex.Message); } }
private void btnSex_Click(object sender, EventArgs e) { PopList1.Groups.Clear(); DataTable table = new DataTable(); PopListGroup poli = new PopListGroup(); PopList1.Groups.Add(poli); poli.Text = "性别"; table.Columns.Add("sex", typeof(System.Int32)); table.Columns.Add("sexDesc", typeof(System.String)); table.Rows.Add(0, "男"); table.Rows.Add(1, "女"); foreach (DataRow rowli in table.Rows) { poli.Items.Add(rowli["sexDesc"].ToString(), rowli["sex"].ToString()); if (sex.ToString().Length > 0) { if (sex.Equals(rowli["sex"])) { PopList1.SetSelections(poli.Items[(poli.Items.Count - 1)]); } } } PopList1.Show(); }
/// <summary> /// 类型选择 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btntype_Click(object sender, EventArgs e) { PopList1.Groups.Clear(); WorkDInfo frmWorkDocument = new WorkDInfo(); DataTable table = frmWorkDocument.GetWorkDType(); PopListGroup poli = new PopListGroup(); PopList1.Groups.Add(poli); poli.Text = "类型"; //显示样式 foreach (DataRow rowli in table.Rows) { poli.Items.Add(rowli["WDOCTYPE_NAME"].ToString(), rowli["WDOC_TYPE"].ToString()); if (Type.Equals(rowli["WDOC_TYPE"])) { PopListItem popitem = new PopListItem(); popitem.Value = rowli["WDOC_TYPE"].ToString(); PopList1.SetSelections(poli.Items[(poli.Items.Count - 1)]); } } PopList1.ShowDialog(); }
private void btnTime_Press(object sender, EventArgs e) { try { popTime.Groups.Clear(); PopListGroup timeGroup = new PopListGroup { Title = "时间" }; timeGroup.AddListItem("本年", "Year"); timeGroup.AddListItem("本月", "Month"); timeGroup.AddListItem("本周", "Week"); timeGroup.AddListItem("本日", "Day"); popTime.Groups.Add(timeGroup); if (btnTime.Tag != null) { foreach (PopListItem row in popTime.Groups[0].Items) { if (row.Value == btnTime.Tag.ToString()) { popTime.SetSelections(row); } } } popTime.ShowDialog(); } catch (Exception ex) { Toast(ex.Message); } }
private void btnCus_Press(object sender, EventArgs e) { try { popCus.Groups.Clear(); PopListGroup cusGroup = new PopListGroup { Title = "客户选择" }; List <Customer> customers = _autofacConfig.customerService.GetAll(); foreach (Customer Row in customers) { cusGroup.AddListItem(Row.NAME, Row.CUSID.ToString()); } popCus.Groups.Add(cusGroup); if (btnCus.Tag != null) //如果已有选中项,则显示选中效果 { foreach (PopListItem Item in cusGroup.Items) { if (Item.Value == btnCus.Tag.ToString()) { popCus.SetSelections(Item); } } } popCus.ShowDialog(); } catch (Exception ex) { Toast(ex.Message); } }
/// <summary> /// 处理人选择 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnDealMan_Press(object sender, EventArgs e) { try { popDealMan.Groups.Clear(); //数据清空 PopListGroup poli = new PopListGroup(); popDealMan.Groups.Add(poli); poli.Title = "处理人选择"; List <coreUser> users = autofacConfig.coreUserService.GetAdmin(); foreach (coreUser Row in users) { poli.AddListItem(Row.USER_NAME, Row.USER_ID); } if (btnDealMan.Tag != null) //如果已有选中项,则显示选中效果 { foreach (PopListItem Item in poli.Items) { if (Item.Value == btnDealMan.Tag.ToString()) { popDealMan.SetSelections(Item); } } } popDealMan.ShowDialog(); } catch (Exception ex) { Toast(ex.Message); } }
/// <summary> /// 项目选择 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnPro_Press(object sender, EventArgs e) { try { popPro.Groups.Clear(); //数据清空 PopListGroup poli = new PopListGroup(); popPro.Groups.Add(poli); //Smobiler.Core.Controls.PopListItem popListItem1 = new Smobiler.Core.Controls.PopListItem(); //popListItem1.Text = "全部"; //popListItem1.Value = "-1"; poli.AddListItem("全部", "-1"); List <cmdb_project> types = _autofacConfig.assProService.GetAll(); foreach (cmdb_project Row in types) { poli.AddListItem(Row.name, Row.id.ToString()); } if (btnPro.Tag != null) //如果已有选中项,则显示选中效果 { foreach (PopListItem Item in poli.Items) { if (Item.Value == btnPro.Tag.ToString()) { popPro.SetSelections(Item); } } } popPro.ShowDialog(); } catch (Exception ex) { Toast(ex.Message); } }
/// <summary> /// 使用人变更 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnChange_Press(object sender, EventArgs e) { ((frmAssets)Form).popCurrentUser.Groups.Clear(); PopListGroup poli = new PopListGroup(); ((frmAssets)Form).popCurrentUser.Groups.Add(poli); poli.Title = "使用者变更"; List <coreUser> users = _autofacConfig.coreUserService.GetAll(); foreach (coreUser Row in users) { poli.AddListItem(Row.USER_NAME, Row.USER_ID); } Assets assets = _autofacConfig.orderCommonService.GetAssetsByID(lblID.BindDataValue.ToString()); foreach (PopListItem Item in poli.Items) { if (Item.Value == assets.CURRENTUSER) { ((frmAssets)Form).popCurrentUser.SetSelections(Item); ((frmAssets)Form).LastUser = assets.CURRENTUSER; ((frmAssets)Form).ASSID = lblID.BindDataValue.ToString(); } } ((frmAssets)Form).popCurrentUser.ShowDialog(); }
/// <summary> ///挂账人选择 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnUseman_Press(object sender, EventArgs e) { try { popUseman.Groups.Clear(); //数据清空 PopListGroup poli = new PopListGroup(); popUseman.Groups.Add(poli); poli.AddListItem("全部", "-1"); List <cmdb_useman> deps = _autofacConfig.assUserService.GetAll(); foreach (cmdb_useman Row in deps) { poli.AddListItem(Row.name, Row.id.ToString()); } if (btnUseman.Tag != null) //如果已有选中项,则显示选中效果 { foreach (PopListItem Item in poli.Items) { if (Item.Value == btnUseman.Tag.ToString()) { popUseman.SetSelections(Item); } } } popUseman.ShowDialog(); } catch (Exception ex) { Toast(ex.Message); } }
/// <summary> /// 页面初始化 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void frmAttendanceStatSelfDay_Load(object sender, EventArgs e) { try { UserID = Client.Session["U_ID"].ToString(); //用户ID this.btnYear.Text = DateTime.Now.Year.ToString() + "年▼"; //年份显示 this.btnMonth.Text = DateTime.Now.Month.ToString() + "月▼"; //月份显示 PopListGroup popYearG = new PopListGroup(); popYearG.Title = "请选择年份"; popListYear.Groups.Add(popYearG); for (int i = DateTime.Now.Year; DateTime.Now.Year - i < 10; i--) //添加年份选择范围 { PopListItem YearItem = new PopListItem(); YearItem.Text = i.ToString(); popYearG.Items.Add(YearItem); if (i == DateTime.Now.Year) { popListYear.SetSelections(YearItem); } } popListMonth.SetSelections(popListMonth.Groups[0].Items[(DateTime.Now.Month - 1)]); Bind(); } catch (Exception ex) { Toast(ex.Message); } }
/// <summary> /// 仓库选择 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnLocation_Press(object sender, EventArgs e) { try { //仓库列表赋值 popWareHouse.Groups.Clear(); //数据清空 PopListGroup poli = new PopListGroup(); popWareHouse.Groups.Add(poli); List <WareHouse> WHS = _autofacConfig.wareHouseService.GetAllWareHouse(); foreach (WareHouse Row in WHS) { poli.AddListItem(Row.NAME, Row.WAREID); } if (btnWareHouse.Tag != null) //如果已有选中项,则显示选中效果 { foreach (PopListItem Item in popWareHouse.Groups[0].Items) { if (Item.Value == btnWareHouse.Tag.ToString()) { popWareHouse.SetSelections(Item); } } } popWareHouse.ShowDialog(); } catch (Exception ex) { Toast(ex.Message); } }
/// <summary> /// 选择类型 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnType_Press(object sender, EventArgs e) { try { PopType.Groups.Clear(); PopListGroup typeGroup = new PopListGroup(); typeGroup.Title = "资产类型"; var typelist = _autofacConfig.assTypeService.GetAll(); foreach (var type in typelist) { PopListItem item = new PopListItem { Value = type.TYPEID, Text = type.NAME }; typeGroup.Items.Add(item); } PopType.Groups.Add(typeGroup); if (!string.IsNullOrEmpty(btnType.Text)) { foreach (PopListItem row in PopType.Groups[0].Items) { if (row.Text == btnType.Text) { PopType.SetSelections(row); } } } PopType.ShowDialog(); } catch (Exception ex) { Toast(ex.Message); } }
/// <summary> /// 经办人 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnUser_Press(object sender, EventArgs e) { tableUser = _bll.getTableForUser( ); try { popListUser.Groups.Clear( ); PopListGroup typeGroup = new PopListGroup { Title = "出库类型" }; foreach (DataRow row in tableUser.Rows) { PopListItem item = new PopListItem { Value = row["DBA001"].ToString( ), Text = row["DBA002"].ToString( ) }; typeGroup.Items.Add(item); } popListUser.Groups.Add(typeGroup); this.popListUser.ShowDialog( ); } catch (Exception ex) { Toast(ex.Message); } }