Example #1
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        Generalfunction gf = new Generalfunction();

        gf.connectionopen();
        Label6.Text      = gf.iud("(update farmer  set fname='" + Txtname.Text + "',fadd='" + Txtadd.Text + "',mno='" + Txtmob.Text + "' where fid=" + long.Parse(Label5.Text) + ")", "update Sucessfully");
        Label6.ForeColor = System.Drawing.Color.Blue;


        gf.connectionclose();

        GridView1.DataBind();
    }
Example #2
0
    protected void Button1_Click1(object sender, EventArgs e)
    {
        Generalfunction gf = new Generalfunction();

        gf.connectionopen();
        Label6.Text = gf.iud("(delete from  farmer  where fid=" + long.Parse(Label5.Text) + ")", "Deleted Sucessfully");

        Label6.ForeColor = System.Drawing.Color.Blue;


        gf.connectionclose();
        GridView1.DataBind();
    }
Example #3
0
    protected void Btnupload_Click(object sender, EventArgs e)
    {
        Generalfunction gf = new Generalfunction();

        gf.connectionopen();
        Label6.Text      = gf.iud("insert into farmer(fname,fadd,mno) values('" + Txtname.Text + "','" + Txtadd.Text + "','" + Txtmob.Text + "')", "saved Sucessfully");
        Label6.ForeColor = System.Drawing.Color.Blue;


        gf.connectionclose();
        //  Response.Redirect("~gridview.aspx");

        GridView1.DataBind();
    }
    protected void Btnregister_Click(object sender, EventArgs e)
    {
        if (Page.IsValid)
        {
            Generalfunction gf = new Generalfunction();
            gf.connectionopen();
            gf.cmd.CommandText = "select count(*) from Registration  where loginname='" + Txtlogin.Text + "'";
            string count = gf.cmd.ExecuteScalar().ToString();
            if (count == "0")
            {
                gf.iud("insert into Registration(upass,fname,mname,lname,uadd,dob,umail,loginname)values('" + Txtrepassword.Text + "','" + Txtfirname.Text + "','" + Txtmidname.Text + "','" + Txtrlastname.Text + "','" + Txtraddress.Text + "','" + Txtdob.Text + "','" + Txtmail.Text + "','" + Txtlogin.Text + "' )", "saved");
                // gf.iud("insert into State(sname)values('"+Dropstate.SelectedItem.Text+'""));
            }

            else
            {
                Label15.Text = "user is already exits";
            }

            gf.connectionclose();
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        Generalfunction gf = new Generalfunction();

        gf.iud("insert into Registration(upass,fname,mname,lname,uadd,dob,umail)values('" + Txtrepassword.Text + "','" + Txtfirname.Text + "','" + Txtmidname.Text + "','" + Txtrlastname.Text + "','" + Txtraddress.Text + "','" + Txtdob.Text + "','" + Txtmail.Text + "' )", "saved");
    }