MvcBug/Controllers/SofttypeController.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Data;
using Common;
using System.Data.SqlClient;
namespace MvcBug.Controllers
{
public class SofttypeController : Controller
{
//
// GET: /Softtype/
public ActionResult Index()
{
return View();
}
public string GetDataGridJson()
{
string pagesize = "10";
string curpage = "1";
int totalcount;
pagesize = string.IsNullOrEmpty(Request.Params["rows"]) ? pagesize : Request.Params["rows"];
curpage = string.IsNullOrEmpty(Request.Params["page"]) ? curpage : Request.Params["page"];
DataTable dt = new DAL.QueryDAL().GetDataTable("softtype", "Id", "Id,Code,Name,Verno", "", "", "", curpage, pagesize, out totalcount);
string jsonstr = JsonHelper.DataGridJson(dt, totalcount);
return jsonstr;
}
public string AddUpdate(FormCollection forms)
{
int Id = forms["Id"] == "" ? 0 : Convert.ToInt32(forms["Id"]);
string Code = forms["Code"];
string Name = forms["Name"];
string Verno = forms["Verno"];
string jsonstr = string.Empty;
try
{
int result = new DAL.SofttypeDAL().AddUpdate(Id, Code, Name, Verno);
if (result > 0)
{
jsonstr = "{\"success\":true}";
}
}
catch (SqlException ex)
{
jsonstr = "{\"errorMsg\":\"" + ex.Errors[0].ToString() + "\"}";
}
return jsonstr;
}
public string Del()
{
string jsonstr = string.Empty;
string ids = Request.Params["id"];
后面还有 18 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。