DAL/Models/GZXX_Group.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using DBUtility;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
namespace DAL.Models
{
public class GZXX_Group
{
public Model.Models.GZXX_Group GetGroupInfo(int groupid)
{
Model.Models.GZXX_Group model = new Model.Models.GZXX_Group();
SqlParameter[] param = new SqlParameter[] {
new SqlParameter("@groupid",SqlDbType.Int)
};
param[0].Value = groupid;
DataTable dt = DbHelperSQL.Query("select * from GZXX_Group where groupid=@groupid", param).Tables[0];
if (dt.Rows.Count > 0)
{
model.groupid = int.Parse(dt.Rows[0]["groupid"].ToString());
model.groupname = dt.Rows[0]["groupname"].ToString();
model.intro = dt.Rows[0]["intro"].ToString();
model.powerlist = dt.Rows[0]["powerlist"].ToString();
return model;
}
else
{
return null;
}
}
public bool Add(Model.Models.GZXX_Group model)
{
string sql = "insert into GZXX_Group(GroupName,Intro,PowerList) values(@GroupName,@Intro,@PowerList)";
SqlParameter[] param = new SqlParameter[] {
new SqlParameter("@GroupName",SqlDbType.VarChar),
new SqlParameter("@Intro",SqlDbType.VarChar),
new SqlParameter("@PowerList",SqlDbType.Text)
};
param[0].Value = model.groupname;
param[1].Value = model.intro;
param[2].Value = model.powerlist;
if (DBUtility.DbHelperSQL.ExecuteSql(sql, param) > 0)
{
return true;
}
else
{
return false;
}
}
public bool Update(Model.Models.GZXX_Group model)
{
string sql = "update GZXX_Group set GroupName=@GroupName,Intro=@Intro,PowerList=@PowerList where GroupID = @GroupID";
SqlParameter[] param = new SqlParameter[] {
后面还有 68 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
