Exemplo n.º 1
0
        protected void SaveButton_OnClick(object sender, EventArgs e)
        {
            if (Frame.EntityList.SelectedValue != "")
            {
                //if (PredicateBuilder1.template.Fields.Count == 0)
                //    return;
                if (Frame.UserList.SelectedValue != "")
                {
                    SaveEntityFilter(Frame.UserList.SelectedValue, "[Z_EUFilter]", "[Z_EUFilterAttribute]", "[UserID]", "[Z_IUPermission]");
                }
                else if (Frame.UserTypeList.SelectedValue != "")
                {
                    SaveEntityFilter(Frame.UserTypeList.SelectedValue, "[Z_EUTFilter]", "[Z_EUTFilterAttribute]", "[userTypeID]", "[Z_IUTPermission]");
                }
            }
            else if (Frame.UserList.SelectedValue != "")
            {
                SavePermission(Frame.UserList.SelectedValue, "[Z_EUPermission]", "[userID]");
            }
            else if (Frame.UserTypeList.SelectedValue != "")
            {
                SavePermission(Frame.UserTypeList.SelectedValue, "[Z_EUTPermission]", "[userTypeID]");
            }

            StorageUserObgects.ClearAllCache();

            //Storage.ClearAllCache();

            Storage.ClearBusinessContents();
        }
Exemplo n.º 2
0
        protected void LogoutButton_Click(object sender, EventArgs e)
        {
            var SystemUser = Session["SystemUser"];

            string query = string.Format("UPDATE [Log].[ServerSession] SET [finish] = GETDATE() WHERE [sessionID] = '{0}' AND [finish]  is null ", SystemUser);

            Global.GetDataTable(query);


            StorageUserObgects.ClearAllCache();

            Session.Abandon();
            Session.Clear();

            HttpContext.Current.Cache.Remove(Session.SessionID);

            Response.Redirect("~/Login.aspx");
        }