DAL/NewDAL.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Common;
using Entitry;
using System.Data.SqlClient;
namespace DAL
{
public class NewDAL
{
public static List<company> Selectcompany()
{
string sql = "select * from company where state=2";
SqlDataReader dr = DBHelp.SelectData(sql);
List<company> list1 = new List<company>();
while (dr.Read())
{
company c = new company();
c.companyID = (int)dr["companyID"];
c.CText = (string)dr["CText"];
c.Count = (string)dr["Count"];
c.ReportUrl = (string)dr["ReportUrl"];
list1.Add(c);
}
dr.Close();
return list1;
}
public static int updateState(int id)
{
string sql = "update company set state='1' where companyID='"+id+"'";
int num = DBHelp.UpdateDate(sql);
return num;
}
public static int updateState2(int id)
{
string sql = "update company set state='3' where companyID='" + id + "'";
int num = DBHelp.UpdateDate(sql);
return num;
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。