コード例 #1
0
 protected void LinkButton4_Click(object sender, EventArgs e)
 {
     AccessDataSource1.Delete();
     Session.Abandon();
     Session.RemoveAll();
     Response.Redirect("Default.aspx");
 }
コード例 #2
0
    protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        string cname = GridView1.DataKeys[e.RowIndex].Values[0].ToString();

        data();
        query = "delete from compcreate where compname='" + cname + "'";
        AccessDataSource1.DeleteCommand = query;
        AccessDataSource1.Delete();
        con.Close();
        GridView1.DataBind();
    }
コード例 #3
0
    protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        int sid = Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Values[0].ToString());

        data();
        query = "delete from studet where id=" + sid + "";
        AccessDataSource1.DeleteCommand = query;
        AccessDataSource1.Delete();
        con.Close();
        GridView1.DataBind();
    }
    protected void ASPxImageGallery1_CustomCallback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
    {
        string[] parts   = e.Parameter.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
        string   command = parts[0];

        if (command.Equals("REMOVE", StringComparison.InvariantCultureIgnoreCase))
        {
            File.Delete(string.Format(Server.MapPath(ASPxImageGallery1.ImageUrlFormatString), GetImageFileNameById(parts[1])));
            AccessDataSource1.DeleteParameters["ID"].DefaultValue = parts[1];
            AccessDataSource1.Delete();
            ASPxImageGallery1.UpdateImageCacheFolder();
        }
        else if (command.Equals("REFRESH", StringComparison.InvariantCultureIgnoreCase))
        {
            ASPxImageGallery1.UpdateImageCacheFolder();
        }
    }
コード例 #5
0
        private void stergeInregistrare()
        {
            int p = GridView1.SelectedIndex;
            int n;

            AccessDataSource1.DeleteParameters[0].DefaultValue = TxtIdProdus.Text;
            AccessDataSource1.Delete();
            GridView1.DataBind();
            n = GridView1.Rows.Count;
            if (n > 0)
            {
                if (p == n)
                {
                    GridView1.SelectedIndex = p - 1;
                }
                else
                {
                    GridView1.SelectedIndex = p;
                }
            }
        }
コード例 #6
0
 protected void Gv_User_RowDeleting(object sender, GridViewDeleteEventArgs e)
 {
     AccessDataSource1.Delete();
 }