Пример #1
0
 public static int DeleteFolderRows(int FolderId, bool DeleteRel)
 {
     if (DeleteRel)
     {
         StockDB.DeleteFolderRelRows("FolderId=" + FolderId);
     }
     DataRow[] rowArray1 = StockDB.GetDataRows(StockDB.dtFolderAll, "ParentId=" + FolderId);
     DataRow[] rowArray2 = rowArray1;
     for (int num2 = 0; num2 < rowArray2.Length; num2++)
     {
         DataRow row1 = rowArray2[num2];
         StockDB.DeleteFolderRows((int)row1["FolderId"], DeleteRel);
     }
     return(StockDB.DeleteFolderRows("ParentId=" + FolderId));
 }
Пример #2
0
 private void btnDelete_Click(object sender, EventArgs e)
 {
     if (this.CanDelete)
     {
         int num1 = (int)this.CurrentRow["ParentId"];
         int num2 = (int)this.CurrentRow["FolderId"];
         StockDB.DeleteFolderRows("FolderId=" + num2);
         StockDB.DeleteFolderRelRows("FolderId=" + num2);
         StockDB.ResetFolderDatabase();
         num2 = StockDB.GetMaxFolderId(num1.ToString());
         if (num2 == 0)
         {
             num2 = num1;
         }
         ListForm.Current.FolderId = num2;
         this.CreateTree();
     }
 }