如何使用devexpress将数据从gridcontrol编辑和保存到数据库

问题描述

这是我显示的数据-之所以有它,是因为我将其输入了数据库

Displayed data

ServiceRecordEmployeeRecord来自]

2result from postman 这是我的保存方法,我的代码不正确,我不知道正确的代码是什么:

int rowendix;
rowendix = GV_ServiceRec.GetDataSourceRowIndex(GV_ServiceRec.FocusedRowHandle);

Type_ServiceRecord MyServiceRec = new Type_ServiceRecord
{
     EmployeeID = Txt_EmployeeID.Text,RecordID = Txt_RecordNumber.Text,JobTitle = GV_ServiceRec.GetRowCelldisplayText(rowendix,"JobTitle"),ServiceFrom = GV_ServiceRec.GetRowCelldisplayText(rowendix,"ServiceFrom"),Serviceto = GV_ServiceRec.GetRowCelldisplayText(rowendix,"Serviceto"),Salary = GV_ServiceRec.GetRowCelldisplayText(rowendix,"Salary"),EmploymentStatus = GV_ServiceRec.GetRowCelldisplayText(rowendix,"EmploymentStatus")
};

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)