private void frmAddSupplier_Load(object sender, EventArgs e)
 {
     cbb_Group.DataSource    = _supdll.GetTableTypeSupplierMySQL();
     cbb_Group.DisplayMember = "NAME_GROUP";
     if (_sup != null)
     {
         LoadSupplier();
     }
     else
     {
         txt_ID.Text = (_supdll.GetIDMaxSupplierMySQL() + 1).ToString();
     }
 }
Example #2
0
        //Load nhom nha cung cap
        public void LoadTreeGroupSup()
        {
            _sup = new C_Supplier();
            tV_GroupSup.Nodes.Clear();
            tV_GroupSup.Nodes.Add("Tất cả");
            tV_GroupSup.Nodes[0].Tag = "1";
            tV_GroupSup.Nodes[0].ContextMenuStrip = cMS_GroupSup;
            DataTable typeCus = new DataTable();

            typeCus = _sup.GetTableTypeSupplierMySQL();
            for (int i = 0; i < typeCus.Rows.Count; i++)
            {
                tV_GroupSup.Nodes[0].Nodes.Add(typeCus.Rows[i][0].ToString());
                tV_GroupSup.Nodes[0].Nodes[i].Tag = "2";
                tV_GroupSup.Nodes[0].Nodes[i].ContextMenuStrip = cMS_GroupSup;
            }
            tV_GroupSup.Nodes[0].ExpandAll();
        }