Example #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");
        }
Example #2
0
 partial void Deleteowner(owner instance);
Example #3
0
 partial void Updateowner(owner instance);
Example #4
0
 partial void Insertowner(owner instance);