DAL/EmployDAL.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Common;
using System.Configuration;
using System.Data.SqlClient;
using System.Data;
namespace DAL
{
public class EmployDAL : DALBase
{
public EmployDAL()
{
this.ConnStr = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
}
public int AddUpdate(int Id, string Code, string Name, int Departmentid,int Showallbug)
{
this.ParameterList = new SqlParameterList();
this.ParameterList.Add("@Id", Id);
this.ParameterList.Add("@Code", Code);
this.ParameterList.Add("@Name", Name);
this.ParameterList.Add("@Departmentid", Departmentid);
this.ParameterList.Add("@Showallbug", Showallbug);
string sqlstr = string.Empty;
if (Id == 0)
{
sqlstr = "Insert into employ(Code,Name,Departmentid,Showallbug) values(@Code,@Name,@Departmentid,@Showallbug)";
}
else
{
sqlstr = "Update employ set Code=@Code,Name=@Name,Departmentid=@Departmentid,Showallbug=@Showallbug where Id=@Id";
}
return this.ExecuteNonQueryFromSQL(sqlstr);
}
public DataTable Login(string Name)
{
this.ParameterList = new SqlParameterList();
this.ParameterList.Add("Name", Name);
string sqlstr = "select * from employ where Name=@Name";
return this.ExecuteDataTableFromSQL(sqlstr);
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。