Beispiel #1
0
        private void GetEditData(object p)

        {
            sec lst = new sceAccess().Getsec(Int32.Parse(p.ToString()));

            TextBox1.Text = lst.Name;
        }
Beispiel #2
0
        protected void LinkButton1_Click(object sender, EventArgs e)
        {
            int id  = Convert.ToInt32((sender as LinkButton).CommandArgument);
            sec lst = new sceAccess().Getsec(id);

            TextBox1.Text      = lst.Name;
            HiddenField1.Value = id.ToString();
            Button1.Visible    = false;
        }
Beispiel #3
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            int id = Int32.Parse(HiddenField1.Value);
            sec se = new sec();

            se.Name = TextBox1.Text;
            sceAccess manager = new sceAccess();

            if (manager.Update(se, id) > 0)
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "ClientScript", "alert('Succesfully updated')", true);
                this.GridView1.DataSourceID = SqlDataSource1.ID;
            }
            else
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "ClientScript", "alert('Succesfully updated')", true);
            }
        }