コード例 #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);
        }