public ActionResult Edit_DB_WebConfig() { this.Response.ContentType = "text/plain"; NModel.DB_WebConfig model = new NModel.DB_WebConfig(); BLL.DB_WebConfig dal = new BLL.DB_WebConfig(); String JsonStr = ""; bool isGet = Tool.NStr.PostForSetVal <NModel.DB_WebConfig>(ref model, ref JsonStr, ""); // 下面代码编写 if (isGet && //&& !string.IsNullOrEmpty(model.WebConfig_Code) && // !string.IsNullOrEmpty(model.WebConfig_Title) && ! // string.IsNullOrEmpty(model.WebConfig_Keywords) && // !string.IsNullOrEmpty(model.WebConfig_Description) && //// !string.IsNullOrEmpty(model.File_Category_Size)&& (model.WebConfig_ID > 0) ) { //取默认值 model.WebConfig_EditTime = DateTime.Parse(DateTime.Now.ToString("s")); bool isEdit = dal.EditFree(model, (long)model.WebConfig_ID) > 0 ? true : false; string msg = dal.ErrorMsg; if (!string.IsNullOrEmpty(msg)) { msg = "原因:" + msg; } if (isEdit) { this.Response.Write(Tool.NMsg.SetMsg("修改成功", "1")); this.Response.End(); } else { this.Response.Write(Tool.NMsg.SetMsg("修改失败" + msg, "0")); this.Response.End(); } dal.Close(); } else { this.Response.Write(Tool.NMsg.SetMsg("提交失败", "0")); this.Response.End(); } return(View()); }