Пример #1
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Button_Delete(object sender, EventArgs e)
        {
            DAL db = new DAL();
              var item = new Model();

              item.id = Convert.ToInt16(textID.Text);
              db.DELETE(item);
        }
Пример #2
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Button_Insert(object sender, EventArgs e)
        {
            DAL db = new DAL();
                var item = new Model();

                item.breed = txtBreed.Text;
                item.weight = Convert.ToDouble(weight.Text);
                item.age = Convert.ToDouble(age.Text);
                db.CREATE(item);
        }
Пример #3
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Button_Update(object sender, EventArgs e)
        {
            DAL db = new DAL();
               var item = new Model();

               item.id =Convert.ToInt16(textID.Text);
               item.breed = txtBreed.Text;
               item.weight = Convert.ToDouble(weight.Text);
               item.age = Convert.ToDouble(age.Text);
               db.UPDATE(item);
        }