1.前端和后端交互
var listparm = new DataParam("MyTableList", ddl.ToString()); var ridparm = new DataParam("RelateId", document.getElementById("RelateId").value); var rtn = Execute.Post("UpdateMyTableList", listparm, ridparm); if (rtn.HasError) rtn.ShowError(); else { var datevalue = rtn.ReturnDs.Params("test").GetValue(); }
private DataStore UpdateMyTableList() { DataStore ds = new DataStore(); try { string RelateId = RequestDs["RelateId"]; string MyTableList = RequestDs["MyTableList"]; DbRecord dr = new DbRecord(officeAccess, tableName, RelateId); dr["lzks"] = MyTableList; dr.Update(); ds["test"]="test"; ds.Add(DbTool.GetResultParam((int)DbResult.Successful, null, null)); return ds; } catch (DbException dbe) { //返回操作失败的参数 ds.Add(DbTool.GetResultParam((int)DbResult.SqlError, dbe.Message, null)); return ds; } }
时间: 2024-10-13 06:17:35