Exemplo n.º 1
0
        protected void dodaj_Click(object sender, EventArgs e)
        {
            if (fname.Text == "" || lname.Text == "" || address.Text == "")
            {
                error.Text = "Insert values!";
                return;
            }
            var a = from ow in db.owners
                    select ow.owner_id;

            owner o = new owner();

            o.fname    = fname.Text;
            o.lname    = lname.Text;
            o.address  = address.Text;
            o.owner_id = a.Max() + 1;

            db.owners.InsertOnSubmit(o);
            db.SubmitChanges();
            Response.Redirect("Dog.aspx");
        }
Exemplo n.º 2
0
 partial void Deleteowner(owner instance);
Exemplo n.º 3
0
 partial void Updateowner(owner instance);
Exemplo n.º 4
0
 partial void Insertowner(owner instance);