public void addbooklogic(bookDto obj) { bookDto bobj = new bookDto(); bobj.author = obj.author; bobj.book_id = obj.book_id; bobj.book_name = obj.book_name; bobj.category = obj.category; bobj.price = obj.price; bobj.published_date = obj.published_date; }
private void btn_add_book_Click(object sender, EventArgs e) { bookDto bobj = new bookDto(); bobj.author = txtbx_author.Text; bobj.book_id = txtbx_book_id.Text; bobj.book_name = txtbx_book_name.Text; bobj.category = txtbx_category.Text; bobj.price = Convert.ToInt32(txtbx_price.Text); bobj.published_date = Convert.ToDateTime(txtbx_published_date.Text); booklogic blogic = new booklogic(); blogic.addbooklogic(bobj); }