|
楼主 |
发表于 2020-12-15 12:45:01
|
显示全部楼层
类代码:
private void UpdateRecord()
{
try
{
// myDataSet.Tables["Info_List"].Rows[iCurrentRow]["Info_Id"] = base.Info_Id;
myDataSet.Tables["Info_List"].Rows[iCurrentRow]["Info_Title"] = base.Info_Title;
myDataSet.Tables["Info_List"].Rows[iCurrentRow]["Info_Body"] = base.Info_Body;
if(base.Info_Date!="")
{
myDataSet.Tables["Info_List"].Rows[iCurrentRow]["Info_Date"]=Convert.ToDateTime(base.Info_Date);
}
if(base.End_Date!="")
{
myDataSet.Tables["Info_List"].Rows[iCurrentRow]["End_Date"]=Convert.ToDateTime(base.End_Date);
}
myDataSet.Tables["Info_List"].Rows[iCurrentRow]["uid"] = base.uid;
myDataSet.Tables["Info_List"].Rows[iCurrentRow]["Info_Class"] = base.Info_Class;
mySqlDataAdapter.Update(myDataSet,"Info_List");
}
catch
{
}
}
public void Save()
{
if (bIsDirty==true)
{
UpdateRecord();
bIsDirty=false;
}
}
cs文件代码
CInfo_Lists m_Info_List=new CInfo_Lists();
m_Info_List.bIsDirty=true;
m_Info_List.Save (); |
|