Controllers/ExaminationController.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using XXX公司积分评比系统.Models;
namespace XXX公司积分评比系统.Controllers
{
public class ExaminationController : Controller
{
/// <summary>
/// 考核项管理
/// </summary>
/// <returns></returns>
public ActionResult Index(string khxh, string namekey, int? bm, string sex)
{
string sql = "select * from '考核分类表' order by Id desc";
DataTable tab = SQLiteHelper.GetDataTable(sql);
//获取其它数据
ViewData["khxh"] = khxh;
ViewData["namekey"] = namekey;
ViewData["bm"] = bm.HasValue ? bm.Value.ToString() : "";
ViewData["bmlist"] = tab;//
/////////////////////
string sql2 = @"SELECT '考核分值表'.Id as yID, * from '考核分值表' inner join '考核分类表' "
+ "on '考核分值表'.所属考核分类='考核分类表'.ID where 1=1 ";
if (!string.IsNullOrEmpty(khxh))
{
sql2 += " and 考核项序号 like '%" + khxh + "%' ";
}
if (!string.IsNullOrEmpty(namekey))
{
sql2 += " and 考核名 like '%" + namekey + "%' ";
}
if (!string.IsNullOrEmpty(sex))
{
sql2 += " and 录入类型='" + sex + "'";
}
if (bm.HasValue && bm.Value != -1)
{
sql2 += " and 所属考核分类=" + bm.Value;
}
sql2 += " order by '考核分值表'.Id desc";
DataTable tab2 = SQLiteHelper.GetDataTable(sql2);
/////////////////////////////
return View(tab2);
}
#region 增加 视图
public ActionResult Add()
{
//读取部门数据
string sql = "select * from '考核分类表' order by Id desc";
DataTable tab = SQLiteHelper.GetDataTable(sql);
ViewData["bmlist"] = tab;//
后面还有 82 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
