Ejemplo n.º 1
0
 /// <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 = "借用人选择";
         List <coreUser> users = _autofacConfig.coreUserService.GetAll();
         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);
     }
 }
Ejemplo n.º 2
0
 /// <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);
     }
 }