首页 > 代码库 > jc公共

jc公共

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 = http://www.mamicode.com/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; } }

 

jc公共