Example #1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            AGRODataContext db = new AGRODataContext(Server.MapPath("\\"));

            Cultures a = new Cultures()
            {
                Cname       = TextBox1.Text,
                MarketPrice = Convert.ToDouble(TextBox3.Text),
                Count       = Convert.ToInt32(TextBox2.Text)
            };

            db.Cultures.InsertOnSubmit(a);

            try
            {
                db.SubmitChanges();
                BindGrid();
            }

            catch (Exception exception)
            {
                Debug.WriteLine($"Something wrong: {exception.Message}");
            }
        }
Example #2
0
 partial void DeleteCultures(Cultures instance);
Example #3
0
 partial void UpdateCultures(Cultures instance);
Example #4
0
 partial void InsertCultures(Cultures instance);