hello all, i need help.
i'm using devexpress combobox
binding.
Datasource : InvoiceBindingSource
DisplayMember :
SupplierName
ValueMember : IdSupplier
and inside it's property
bindingsource editvalue, i bind SupplierBindingSource - IdSupplier
nah
i'm trying to save that combo box value as idsupplier (not supplier name) into
sqlserver r2 database,
in my adapter, i use this
query,
in this case, i use
current as datarowview to save it,
current("IdSupplier")
but everytime i
save, IdSupplier value in database is always 0.
i really need help,
thanks before..
i'm using devexpress combobox
binding.
Datasource : InvoiceBindingSource
DisplayMember :
SupplierName
ValueMember : IdSupplier
and inside it's property
bindingsource editvalue, i bind SupplierBindingSource - IdSupplier
nah
i'm trying to save that combo box value as idsupplier (not supplier name) into
sqlserver r2 database,
in my adapter, i use this
query,
cmd.CommandText = "insert into Invoice (IdInvoice, Number, Date, IdSupplier, Info, CreatedBy, CreatedDate, CreatedTime) " + "values (@IdInvoice, @Number, @Date, @IdSupplier, @Info, @CreatedBy, @CreatedDate, @CreatedTime)" cmd.Parameters.Add("@IdInvoice", SqlDbType.BigInt).Value = NewIdMaster cmd.Parameters.Add("@Number", SqlDbType.VarChar, 100).Value = current("Number") cmd.Parameters.Add("@Date", SqlDbType.Date).Value = current("Date") cmd.Parameters.Add("@IdSupplier", SqlDbType.BigInt).Value = current("IdSupplier") cmd.Parameters.Add("@Info", SqlDbType.VarChar, 1000).Value = current("Info") cmd.Parameters.Add("@CreatedBy", SqlDbType.VarChar, 100).Value = UserManagement.Global.Variables.Username cmd.Parameters.Add("@CreatedDate", SqlDbType.Date).Value = DateTime.Now cmd.Parameters.Add("@CreatedTime", SqlDbType.Time).Value = DateTime.Now.TimeOfDay
in this case, i use
current as datarowview to save it,
current("IdSupplier")
but everytime i
save, IdSupplier value in database is always 0.
i really need help,
thanks before..