Esempio n. 1
0
        protected void rptVet_ItemsCommand(Object Sender, RepeaterCommandEventArgs e)
        {
            try
            {
                PetStore.DB.Data oDB    = new PetStore.DB.Data();
                HiddenField      userID = (HiddenField)e.Item.FindControl("userID");
                switch (e.CommandName.ToUpper())
                {
                case "BLOCK":
                    oDB.BlockUser(userID.Value);
                    Response.Redirect("admin.aspx");
                    break;

                case "UNBLOCK":
                    oDB.UnblockUser(userID.Value);
                    Response.Redirect("admin.aspx");
                    break;
                }
            }
            catch
            {
            }
        }