mysql+C#
MySqlParameter[] prams = new MySqlParameter[11]; prams[0] = new MySqlParameter("@personindex", personindex); prams[1] = new MySqlParameter("@businessindex", businessindex); prams[2] = new MySqlParameter("@systemstatus", systemstatus); prams[3] = new MySqlParameter("@providerindex", providerindex); prams[4] = new MySqlParameter("@alarmindex", alarmindex); prams[5] = new MySqlParameter("@orderlevel", orderlevel); prams[6] = new MySqlParameter("@exceptfixtime", 24); prams[7] = new MySqlParameter("@fixperson", fixperson); prams[8] = new MySqlParameter("@currentstatus", currentstatus); prams[9] = new MySqlParameter("@orderhandle", orderhandle); prams[10] = new MySqlParameter("@handletype", handletype); using (cnpsim_dbEntities dbManager = new cnpsim_dbEntities()) { var index = dbManager.Database.SqlQuery<string>("call InsertWorkOrderInfo(@personindex,@businessindex,@systemstatus,@providerindex ,@alarmindex, @orderlevel,@exceptfixtime, @fixperson,@currentstatus ,@orderhandle,@handletype)", prams); string ss=index.FirstOrDefault().ToString(); string s = ss; return RedirectToAction("SuccessInfo", "BackInfo", new { str1 = "成功添加派工单", str2 = "", url = "http://wx115.cnpsim.com/Business/index" }); }