Web/Admin/ajax/FoodCommplit.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
// foodcommplit.cs:餐品名称自动完成.
// CopyRight (c) 2009-2010 HangJing Teconology. All Rights Reserved.
// jijunjian@iWMPT.com
// 2010-04-28
using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Text;
using WMPT.SQLServerDAL;
using WMPT.Model;
using WMPT.Common;
public partial class Ajax_FoodCommplit :AdminPageBase
{
ArrayList list = new ArrayList();
AllFoods dal_food = new AllFoods();
protected void Page_Load(object sender, EventArgs e)
{
string content = Request["names"];
if (content != null)
{
FillList( Server.UrlDecode( Request["names"]));
}
}
protected void FillList(string s)
{
string sql = "FoodName like '%"+s+"%'";
int count = dal_food.GetCount(sql);
IList<AllFoodsInfo> temp = dal_food.GetList(count , 1 ,sql , "dataid" , 1);
for (int x = 0; x < temp.Count; x++)
{
list.Add(temp[x].Foodname);
}
NameService nams = NameService.getInstance(list);
ArrayList maches = nams.findNames(s, 0);
maches.Sort();
StringBuilder results = new StringBuilder("");
if (maches.Count != 0)
{
int ncount = 0;
foreach (string name in maches)
{
后面还有 23 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
