private void bt_Right_Click(object sender, EventArgs e)
        {
            if (lsbWt.SelectedItem != null)
            {
                if (lsbWt.SelectedItems.Count > 0)
                {
                    for (int i = 0; i < lsbWt.SelectedItems.Count; i++)
                    {
                        lsbSelected.AddItem(lsbWt.SelectedItems[i].ToString(), lsbWt.Values[lsbWt.Items.IndexOf(lsbWt.SelectedItems[i].ToString())]);
                    }
                    FlashWt();
                }
            }
            string key = cmbTer.SelectedValue;

            if (key != null)
            {
                List <WorkTypeModel> list = new List <WorkTypeModel>();
                for (int i = 0; i < lsbSelected.Items.Count; i++)
                {
                    WorkTypeModel wtb = new WorkTypeModel(lsbSelected.Values[i], lsbSelected.Items[i].ToString());
                    list.Add(wtb);
                }
                WtTable[key] = list;
            }
        }
Beispiel #2
0
 private List<WorkTypeModel> GetWtList(string terid)
 {
     List<WorkTypeModel> list=new List<WorkTypeModel>();
     DataTable dt = bll.GetWtInfoByTerID(terid);
     for (int i = 0; i < dt.Rows.Count; i++)
     {
         WorkTypeModel wtm = new WorkTypeModel(dt.Rows[i][0].ToString(), dt.Rows[i][1].ToString());
         list.Add(wtm);
     }
     return list;
 }
        private List <WorkTypeModel> GetWtList(string terid)
        {
            List <WorkTypeModel> list = new List <WorkTypeModel>();
            DataTable            dt   = bll.GetWtInfoByTerID(terid);

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                WorkTypeModel wtm = new WorkTypeModel(dt.Rows[i][0].ToString(), dt.Rows[i][1].ToString());
                list.Add(wtm);
            }
            return(list);
        }
Beispiel #4
0
 private void bt_Right_Click(object sender, EventArgs e)
 {
     if(lsbWt.SelectedItem!=null)
     {
         if (lsbWt.SelectedItems.Count > 0)
         {
             for (int i = 0; i < lsbWt.SelectedItems.Count; i++)
             {
                 lsbSelected.AddItem(lsbWt.SelectedItems[i].ToString(), lsbWt.Values[lsbWt.Items.IndexOf(lsbWt.SelectedItems[i].ToString())]);
             }
             FlashWt();
         }
     }
     string key = cmbTer.SelectedValue;
     if (key != null)
     {
         List<WorkTypeModel> list = new List<WorkTypeModel>();
         for (int i = 0; i < lsbSelected.Items.Count; i++)
         {
             WorkTypeModel wtb = new WorkTypeModel(lsbSelected.Values[i], lsbSelected.Items[i].ToString());
             list.Add(wtb);
         }
         WtTable[key] = list;
     }
 }