Controllers/ExaminationTypeController.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using XXX公司积分评比系统.Models;
using System.Data;
namespace XXX公司积分评比系统.Controllers
{
public class ExaminationTypeController : Controller
{
/// <summary>
/// 考核类别管理
/// </summary>
/// <returns></returns>
public ActionResult Index()
{
string sql = "select * from '考核分类表' order by Id desc";
DataTable tab = SQLiteHelper.GetDataTable(sql);
return View(tab);
}
#region 增加 视图
public ActionResult Add()
{
return View();
}
/// <summary>
/// 增加帐号的处理方法,该方法给异步请求调用
/// </summary>
/// <param name="st"></param>
/// <returns></returns>
public ActionResult AddAction(string bbh, string adminRole)
{
string sql = "insert into '考核分类表'(id,分类名,类型) values(null,'" + bbh + "','" + adminRole + "')";
int n = SQLiteHelper.ExecuteNonQuery(sql);
//响应内容,响应json数据,构建匿名类对象,有一个属性r
if (n > 0)
{
return Json(new { r = n }, JsonRequestBehavior.AllowGet);
}
else
{
return Json(new { r = 0 }, JsonRequestBehavior.AllowGet);
}
}
#endregion
#region 帐号删除
public ActionResult Delete(int id)
{
string sql = "delete from '考核分类表' where ID=" + id;
int n = 0;
n = SQLiteHelper.ExecuteNonQuery(sql);
if (n > 0)
{
后面还有 36 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
