示例#1
0
文件: SVForm.cs 项目: VILAIDED/QLSV
 public void setCBB()
 {
     foreach (LSH lsh in CSDL_OOP.Instance.GetAllLSH())
     {
         lsh_cbb.Items.Add(new CBBItem
         {
             Value = lsh.ID_Lop,
             Text  = lsh.NameLop
         });
     }
     if (sv.MSSV == null)
     {
         lsh_cbb.SelectedIndex = 0;
     }
     else
     {
         for (int i = 0; i < lsh_cbb.Items.Count; i++)
         {
             CBBItem cb = (CBBItem)lsh_cbb.Items[i];
             if (cb.Value == sv.ID_Lop)
             {
                 lsh_cbb.SelectedIndex = i;
                 break;
             }
         }
     }
 }
示例#2
0
文件: SVForm.cs 项目: VILAIDED/QLSV
        private void setData()
        {
            sv.MSSV   = txt_MSSV.Text;
            sv.NameSV = txt_Name.Text;
            sv.NS     = ns_picker.Value;
            CBBItem item = (CBBItem)lsh_cbb.SelectedItem;

            sv.ID_Lop = item.Value;
        }
示例#3
0
        private void sort_btn_Click(object sender, EventArgs e)
        {
            CBBItem cb = (CBBItem)sort_comboBox.SelectedItem;

            if (cb.Value == 0)
            {
                sortDelegate(byMSSV);
                //sortByMSSV(ascending);
            }
            else if (cb.Value == 1)
            {
                sortDelegate(byName);
                // sortByMSSV(descending);
            }
            else
            {
                sortDelegate(byDate);
            }
        }
示例#4
0
        private void search_btn_Click(object sender, EventArgs e)
        {
            CBBItem cb = (CBBItem)lopSH_cbb.SelectedItem;

            showListSV(search_txt.Text);
        }
示例#5
0
        public void showListSV(string name)
        {
            CBBItem cb = (CBBItem)lopSH_cbb.SelectedItem;

            dataGridView1.DataSource = CSDL_OOP.Instance.GetListSV(cb.Value, name);
        }