DAL/CommunicationDAL.cs
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
using System.Data.SqlClient;
using System.Data;
namespace DAL
{
public class CommunicationDAL
{
/// <summary>
/// 添加
///</summary>
public static int AddCommunication(Communication CommunicationModel)
{
string sql = string.Format("insert into Communication (Conclusion,Plans,FeedBack,EntryTime,UserId,State,Evaluation,ProjectInfoId )values('{0}','{1}','{2}','{3}',{4},'{5}','{6}',{7})",CommunicationModel.Conclusion,CommunicationModel.Plans,CommunicationModel.FeedBack,CommunicationModel.EntryTime,CommunicationModel.UserId,CommunicationModel.State,CommunicationModel.Evaluation,CommunicationModel.ProjectInfoId);
return DBHelper.ExecuteCommand(sql);
}
/// <summary>
/// 根据ID修改
///</summary>
public static int UpdateCommunication(Communication CommunicationModel)
{
string sql = string.Format(" UPDATE Communication set Conclusion='{0}',Plans='{1}',FeedBack='{2}',EntryTime='{3}',UserId={4},State='{5}',Evaluation='{6}',ProjectInfoId={7} where CommunicationId={8} ",CommunicationModel.Conclusion,CommunicationModel.Plans,CommunicationModel.FeedBack,CommunicationModel.EntryTime,CommunicationModel.UserId,CommunicationModel.State,CommunicationModel.Evaluation,CommunicationModel.ProjectInfoId ,CommunicationModel.CommunicationId);
return DBHelper.ExecuteCommand(sql);
}
/// <summary>
/// 根据主键删除
///</summary>
public static int DeleteCommunication(int Id)
{
string sql = string.Format("delete from Communication where CommunicationId={0}", Id);
return DBHelper.ExecuteCommand(sql);
}
/// <summary>
/// 查询条数
///</summary>
public static int CountNumber(string NewWHere)
{
string sql = "";
if (!string.IsNullOrEmpty(NewWHere))
{
sql = "select count(*) from Communication where 1=1 " + NewWHere;
}
else
{
sql = "select count(*) from Communication";
}
return DBHelper.GetIntScalar(sql);
}
/// <summary>
后面还有 95 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。