Example #1
0
 public List<AliGroup> GetAliGroupList()
 {
     DataTable dt = dbHelper.ExecuteDataTable(
           "SELECT Id, Name, HasChildren, ChildrenCount, Level, ParentId FROM AliGroups", null);
     List<AliGroup> list = new List<AliGroup>();
     foreach (DataRow row in dt.Rows)
     {
         AliGroup kw = new AliGroup();
         kw.Id = Convert.ToInt32(row["Id"]);
         kw.Name = (string)row["Name"];
         kw.HasChildren = Convert.ToBoolean(row["HasChildren"]);
         kw.ChildrenCount = Convert.ToInt32(row["ChildrenCount"]);
         kw.Level = Convert.ToInt32(row["Level"]);
         kw.ParentId = Convert.ToInt32(row["ParentId"]);
         list.Add(kw);
     }
     return list;
 }
Example #2
0
 void UpdateGroupItem_Click(object sender, EventArgs e)
 {
     NeedUpdGroup = (AliGroup)this.treeView1.ContextMenuStrip.Tag;
     BackgroundWorker bgWorker = new BackgroundWorker();
     bgWorker.DoWork += new DoWorkEventHandler(bgWorker_DoWork);
     bgWorker.RunWorkerAsync();
     bgWorker.Dispose();
 }
Example #3
0
 private void updateAllProduct_Click(object sender, EventArgs e)
 {
     NeedUpdGroup = null;
     BackgroundWorker bgWorker = new BackgroundWorker();
     bgWorker.DoWork += new DoWorkEventHandler(bgWorker_DoWork);
     bgWorker.RunWorkerAsync();
     bgWorker.Dispose();
 }