HN.UI/Controllers/VendorController.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using HN.BLL;
using HN.Model;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace HN.UI.Controllers
{
/// <summary>
/// 供应商控制器
/// </summary>
public class VendorController : Controller
{
Vendor vdbll = new Vendor();
Category ctgbll = new Category();
#region View-供应商管理列表 Index()
[GlobalFilter("menu")]
public ActionResult Index()
{
return View();
}
#endregion
#region Method-供应商列表 GetList()
[HttpPost]
public string GetList()
{
DataTable dt = vdbll.GetList("");
return JsonConvert.SerializeObject(new { rows = dt });
}
#endregion
#region Method-获取供应商列表GetVendorList(string VenCode, string VenName, string phone, string CateID, int rows, int page)
[HttpPost]
public string GetVendorList(string VenCode, string VenName, string phone, string CateID, int rows, int page)
{
DataTable dt = vdbll.GetVendorList(VenCode, VenName, phone, CateID, rows, page);
int totalCount = Convert.ToInt32(dt.DataSet.Tables["Page_TotalCount"].Rows[0][0].ToString());
return JsonConvert.SerializeObject(new { rows = dt, total = totalCount });
}
#endregion
#region View-添加/编辑供应商 Edit(string id, string CateID, string CateName)
[GlobalFilter("btn", "/Vendor/Index")]
public ActionResult Edit(string id)
{
VendorInfo model = new VendorInfo();
string existsBusiness = "false";
if (new WhStock().ExistsBusiness(null, SessionInfo.OrgID))
{
existsBusiness = "true";
}
if (!string.IsNullOrEmpty(id))
{
model = vdbll.GetModel(null, Convert.ToInt32(id));
后面还有 50 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
