Ejemplo n.º 1
0
 protected void delete_click(object sender, EventArgs e)
 {
     try
     {
         FormView1.DeleteItem();
     }catch (SqlException ex)
     {
         ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Error Delete, Please contact System Administrator');", true);
     }
 }
Ejemplo n.º 2
0
//-------------------------------------------------------------------------------------------
        protected void Delete_Link(object sender, EventArgs e)
        {
            FormView1.DataBind();

            string[] userRoles = GetUserRoles();

            ICustomTypeDescriptor descriptor        = FormView1.DataItem as ICustomTypeDescriptor;
            EntityObject          entityObject      = (EntityObject)descriptor.GetPropertyOwner(null);
            DataAccess            deletePermissions = entityObject.DeletePermissions();

            if (deletePermissions.HasMatchingRole(userRoles))
            {
                FormView1.DeleteItem();
            }
        }
Ejemplo n.º 3
0
 protected void delete_click(object sender, EventArgs e)
 {
     FormView1.DeleteItem();
 }