Ejemplo n.º 1
0
        void lbDelList_Click(object sender, EventArgs e)
        {
            try
            {
                ListInfo li = new ListInfo(int.Parse(deletedId.Value));
                li.Delete();

                if (ProjectId < 0)
                {
                    Response.Redirect("~/Apps/ListApp/Pages/ListInfoList.aspx?Tab=0&ListFolderId=" + _folderId.ToString());
                }
                else
                {
                    Response.Redirect("~/Projects/ProjectView.aspx?Tab=Lists&ProjectId=" + ProjectId.ToString() + "&ListFolderId=" + ListFolderId.ToString());
                }
            }
            catch (MetaFieldReferencedException ex)
            {
                ClientScript.RegisterStartupScript(this.Page, this.GetType(), Guid.NewGuid().ToString("N"),
                                                   String.Format("alert('{0}');", String.Format(CHelper.GetResFileString("{IbnFramework.ListInfo:RefException}"), CHelper.GetResFileString(ListManager.GetListInfoByMetaClassName(ex.MetaClassName).Title))), true);
            }
        }
Ejemplo n.º 2
0
 private void lbDelFolder_Click(object sender, System.EventArgs e)
 {
     //try
     //{
     ListManager.DeleteFolder(int.Parse(deletedId.Value));
     //}
     //catch(Exception ex)
     //{
     //    System.Diagnostics.Trace.WriteLine(ex);
     //}
     if (ProjectId < 0)
     {
         Response.Redirect("~/Apps/ListApp/Pages/ListInfoList.aspx?Tab=0&ListFolderId=" + _folderId.ToString());
     }
     else
     {
         Response.Redirect("~/Projects/ProjectView.aspx?Tab=Lists&ProjectId=" + ProjectId.ToString() + "&ListFolderId=" + ListFolderId.ToString());
     }
 }