c# - Pass a value from textbox to entityframework insert method in windows form -


i using c# windows forms entityframework 6.1.3 datasource.i tryng insert data windows form. have searched various guides of them show example this

   private void createcash(object sender, devexpress.xtrabars.itemclickeventargs e)     {         legalgridview.addnewrow();         legalgridview.showpopupeditform();         var cashbookcreate = new cashbook          {             cashtransact = cashtransacts.name           };         dbcontext.cashbooks.add(cashbookcreate);         dbcontext.savechanges();     } } 

cashtransact name of class , in format enters "legal fees" in database want substitute "legal fees" value in textbox 'cashtransacts' unfortunately when replace there cashtransacts.name instead gets me name of column instead of value type in?

"value in textbox"

the correct way value textbox textbox.text.

the textbox.name return name of control provided it.


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -