protected void Page_Load(object sender, EventArgs e) { if (Session["User"] == null) { //Response.Redirect("../Login.aspx"); //Response.End(); return; } m_DesktopGroupMgr = Global.GetCtx(Session["TopCompany"].ToString()).DesktopGroupMgr; string GroupId = Request["GroupId"]; if (!string.IsNullOrEmpty(GroupId)) { m_guidCurGroupId = new Guid(GroupId); m_CurGroup = (CDesktopGroup)m_DesktopGroupMgr.Find(m_guidCurGroupId); } if (Request.Params["Action"] == "DelDesktopApp") { DelDesktopApp(); Response.End(); } else if (Request.Params["Action"] == "SetBackImg") { SetBackImg(); Response.End(); } else if (Request.Params["Action"] == "UpdateOnlineState") { UpdateOnlineState(); Response.End(); } //桌面背景 m_sBackImg = string.Format("../{0}/DesktopImg/default.jpg", Global.GetDesktopIconPathName()); CUser user = (CUser)Session["User"]; m_Company = (CCompany)Global.GetCtx(Session["TopCompany"].ToString()).CompanyMgr.Find(user.B_Company_id); CDesktop desktop = (CDesktop)user.DesktopMgr.GetFirstObj(); if (desktop != null && desktop.BackImg != "") { m_sBackImg = string.Format("../{0}/DesktopImg/{1}", Global.GetDesktopIconPathName(), desktop.BackImg); } m_UserMenuMgr = user.UserMenuMgr; m_DesktopAppMgr = user.DesktopAppMgr; }
//删除桌面组 void DelDesktopGroup() { string delid = Request["delid"]; if (string.IsNullOrEmpty(delid)) { Response.Write("请选择目录!"); return; } Guid guid = new Guid(delid); CDesktopGroupMgr DesktopGroupMgr = Global.GetCtx(Session["TopCompany"].ToString()).DesktopGroupMgr; DesktopGroupMgr.Delete(guid); if (!DesktopGroupMgr.Save(true)) { Response.Write("删除失败!"); } }