ASPxGridView和Linq常用总结(2)(3)
}
else
{
return "删除失败,模块信息不存在!";
}
}
catch (System.Exception ex)
{
return ex.Message;
}
}
//源
//删除按钮
<ClientSideEvents click="function(s, e) { getDeleteDriver(); }"/>
3、新增、修改和保存
//cs页面
[Ajax.AjaxMethod(Ajax.HttpSessionStateRequirement.Read)]
public string AddDriver(string sDriverName,string sSFZH, dFristLicenseDate)
{
try
{
Tb_Driver objDriver = new Tb_Driver();
objDriver.DriverName = sDriverName;
objDriver.SFZH = sSFZH;
if (dFristLicenseDate!="")
{
objDriver.FristLicenseDate = Convert.ToDateTime(dFristLicenseDate);
}
linqData.Tb_Driver.InsertOnSubmit(objDriver);
linqData.SubmitChanges();
return "成功";
}
相关新闻>>
- 发表评论
-
- 最新评论 更多>>