OA.DAL/EmailService.cs

(开头部分) 6KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

//============================================================
// Producnt name:		TenXiang.Code
// Coded by:			hotboart
// Auto generated at: 	2014-3-20 15:35:47
//============================================================



using System;						
using System.Collections.Generic;	
using System.Text;					
using System.Data;					
using System.Data.SqlClient;		
using OA.Models;



namespace OA.DAL
{								

	public static partial class EmailService
	{	
		//Add Mothed Start
        public static readonly string InsertSql = "INSERT Email (tital, contents, time, fujianID, userId, IsDel, caogao,SEuser)VALUES (@tital, @contents, @time, @fujianID, @userId, @IsDel, @caogao,@SEuser)";
        public static readonly string UpdateSql = "Update Email set tital=@tital, contents=@contents, time=@time, fujianID=@fujianID, userId=@userId, IsDel=@IsDel, caogao=@caogao,SEuser=@SEuser where ID=@ID";
		public static readonly string DeleteSql = "Delete FROM Email  where ID=@ID";
		public static readonly string SelectSql = "Select * FROM Email";
		public static readonly string SelectSqlById = "Select * FROM Email where ID =@ID";
	    public static int AddEmail(Email email)
	    {								
			string sql = InsertSql;
            SqlParameter[] para = new SqlParameter[]
           						  {
										new SqlParameter("@tital",email.Tital), new SqlParameter("@contents",email.Contents), new SqlParameter("@time",email.Time), new SqlParameter("@fujianID",email.FujianID), new SqlParameter("@userId",email.UserId), new SqlParameter("@IsDel",email.IsDel), new SqlParameter("@caogao",email.Caogao),new SqlParameter("@SEuser",email.SEuser)
								  }	;									
    	    return DBHelper.ExecNonQuery(sql, para);
		}  
		public static int UpdateEmail(Email email)
	    {								
			string sql = UpdateSql;
            SqlParameter[] para = new SqlParameter[]
           						  {
										new SqlParameter("@ID",email.ID), new SqlParameter("@tital",email.Tital), new SqlParameter("@contents",email.Contents), new SqlParameter("@time",email.Time), new SqlParameter("@fujianID",email.FujianID), new SqlParameter("@userId",email.UserId), new SqlParameter("@IsDel",email.IsDel), new SqlParameter("@caogao",email.Caogao),new SqlParameter("@SEuser",email.SEuser)
								  }	;									
    	    return DBHelper.ExecNonQuery(sql, para);
		}  
		public static int DelEmail(Email email)
	    {								
			string sql = DeleteSql;
            SqlParameter[] para = new SqlParameter[]
           						  {
										new SqlParameter("@ID",email.ID)
								  }	;									
    	    return DBHelper.ExecNonQuery(sql, para);
		}
		public static IList< Email > GetAllList(int iscg,string Uid)
		{
            string sql = SelectSql + " where isdel=0 and caogao=@cg and userId=@userId order by time desc";
            SqlParameter[] para = new SqlParameter[]
           						  { 
后面还有 96 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。