OA.DAL/ScheduleService.cs

(开头部分) 6KB

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

//============================================================
// Producnt name:		TenXiang.Code
// Coded by:			hotboart
// Auto generated at: 	2014/1/5 11:48:41
//============================================================



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 ScheduleService
	{	
		//Add Mothed Start
		public static readonly string InsertSql = "INSERT Schedule (Title, Address, MeetingId, BeginTime, EndTime, SchContent, CreateUser, CreateTime, IfPrivate)VALUES (@Title, @Address, @MeetingId, @BeginTime, @EndTime, @SchContent, @CreateUser, @CreateTime, @IfPrivate)";
		public static readonly string UpdateSql = "Update Schedule set Title=@Title, Address=@Address, MeetingId=@MeetingId, BeginTime=@BeginTime, EndTime=@EndTime, SchContent=@SchContent, CreateUser=@CreateUser, CreateTime=@CreateTime, IfPrivate=@IfPrivate where ScheduleId=@ScheduleId";
		public static readonly string DeleteSql = "Delete FROM Schedule  where ScheduleId=@ScheduleId";
		public static readonly string SelectSql = "Select * FROM Schedule";
		public static readonly string SelectSqlById = "Select * FROM Schedule where ScheduleId =@ScheduleId";
	    public static int AddSchedule(Schedule schedule)
	    {								
			string sql = InsertSql;
            SqlParameter[] para = new SqlParameter[]
           						  {
										new SqlParameter("@Title",schedule.Title), new SqlParameter("@Address",schedule.Address), new SqlParameter("@MeetingId",schedule.MeetingId), new SqlParameter("@BeginTime",schedule.BeginTime), new SqlParameter("@EndTime",schedule.EndTime), new SqlParameter("@SchContent",schedule.SchContent), new SqlParameter("@CreateUser",schedule.CreateUser), new SqlParameter("@CreateTime",schedule.CreateTime), new SqlParameter("@IfPrivate",schedule.IfPrivate)
								  }	;									
    	    return DBHelper.ExecNonQuery(sql, para);
		}  
		public static int UpdateSchedule(Schedule schedule)
	    {								
			string sql = UpdateSql;
            SqlParameter[] para = new SqlParameter[]
           						  {
										new SqlParameter("@ScheduleId",schedule.ScheduleId), new SqlParameter("@Title",schedule.Title), new SqlParameter("@Address",schedule.Address), new SqlParameter("@MeetingId",schedule.MeetingId), new SqlParameter("@BeginTime",schedule.BeginTime), new SqlParameter("@EndTime",schedule.EndTime), new SqlParameter("@SchContent",schedule.SchContent), new SqlParameter("@CreateUser",schedule.CreateUser), new SqlParameter("@CreateTime",schedule.CreateTime), new SqlParameter("@IfPrivate",schedule.IfPrivate)
								  }	;									
    	    return DBHelper.ExecNonQuery(sql, para);
		}  
		public static int DelSchedule(int schedule)
	    {								
			string sql = DeleteSql;
            SqlParameter[] para = new SqlParameter[]
           						  {
										new SqlParameter("@ScheduleId",schedule)
								  }	;									
    	    return DBHelper.ExecNonQuery(sql, para);
		}
		public static IList< Schedule > GetAllList()
		{								
			string sql = SelectSql;
    	    return GetListBySql(sql);
		}
后面还有 73 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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