예제 #1
0
파일: Affire.cs 프로젝트: TgcqiTeam/Surfing
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(Matisoft.Model.Affire model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into Affire(");
            strSql.Append("CustomerEmail,TimeDate,OperationID)");
            strSql.Append(" values (");
            strSql.Append("@CustomerEmail,@TimeDate,@OperationID)");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters = {
                    new SqlParameter("@CustomerEmail", SqlDbType.NVarChar,50),
                    new SqlParameter("@TimeDate", SqlDbType.DateTime),
                    new SqlParameter("@OperationID", SqlDbType.Int,4)};
            parameters[0].Value = model.CustomerEmail;
            parameters[1].Value = model.TimeDate;
            parameters[2].Value = model.OperationID;

            object obj = DbHelperSQL.GetSingle(strSql.ToString(),parameters);
            if (obj == null)
            {
                return 0;
            }
            else
            {
                return Convert.ToInt32(obj);
            }
        }
예제 #2
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(Matisoft.Model.Comment model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into Comment(");
            strSql.Append("Contents,CustomerID,CommentState,TimeDate)");
            strSql.Append(" values (");
            strSql.Append("@Contents,@CustomerID,@CommentState,@TimeDate)");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters = {
                    new SqlParameter("@Contents", SqlDbType.NVarChar,200),
                    new SqlParameter("@CustomerID", SqlDbType.Int,4),
                    new SqlParameter("@CommentState", SqlDbType.Int,4),
                    new SqlParameter("@TimeDate", SqlDbType.DateTime)};
            parameters[0].Value = model.Contents;
            parameters[1].Value = model.CustomerID;
            parameters[2].Value = model.CommentState;
            parameters[3].Value = model.TimeDate;

            object obj = DbHelperSQL.GetSingle(strSql.ToString(),parameters);
            if (obj == null)
            {
                return 0;
            }
            else
            {
                return Convert.ToInt32(obj);
            }
        }
예제 #3
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(Matisoft.Model.Administrator model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into Administrator(");
            strSql.Append("Admin,Password,AdminiEmail,AdminState,AuthorityID)");
            strSql.Append(" values (");
            strSql.Append("@Admin,@Password,@AdminiEmail,@AdminState,@AuthorityID)");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters = {
                    new SqlParameter("@Admin", SqlDbType.NVarChar,100),
                    new SqlParameter("@Password", SqlDbType.NVarChar,50),
                    new SqlParameter("@AdminiEmail", SqlDbType.NVarChar,50),
                    new SqlParameter("@AdminState", SqlDbType.Int,4),
                    new SqlParameter("@AuthorityID", SqlDbType.Int,4)};
            parameters[0].Value = model.Admin;
            parameters[1].Value = model.Password;
            parameters[2].Value = model.AdminiEmail;
            parameters[3].Value = model.AdminState;
            parameters[4].Value = model.AuthorityID;

            object obj = DbHelperSQL.GetSingle(strSql.ToString(),parameters);
            if (obj == null)
            {
                return 0;
            }
            else
            {
                return Convert.ToInt32(obj);
            }
        }
예제 #4
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(Matisoft.Model.Customer model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into Customer(");
            strSql.Append("Password,CustomerState,CustomerName,CustomerXiaoxue,CustomerChuzhong,CustomerGaozhong,CustomerDaxue,CustomerXueli,CustomerSex,CustomerBirthday,CustomerWorkplace,CustomerEmail,CustomerQQ)");
            strSql.Append(" values (");
            strSql.Append("@Password,@CustomerState,@CustomerName,@CustomerXiaoxue,@CustomerChuzhong,@CustomerGaozhong,@CustomerDaxue,@CustomerXueli,@CustomerSex,@CustomerBirthday,@CustomerWorkplace,@CustomerEmail,@CustomerQQ)");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters = {
                    new SqlParameter("@Password", SqlDbType.NVarChar,50),
                    new SqlParameter("@CustomerState", SqlDbType.Int,4),
                    new SqlParameter("@CustomerName", SqlDbType.NVarChar,20),
                    new SqlParameter("@CustomerXiaoxue", SqlDbType.NVarChar,50),
                    new SqlParameter("@CustomerChuzhong", SqlDbType.NVarChar,50),
                    new SqlParameter("@CustomerGaozhong", SqlDbType.NVarChar,50),
                    new SqlParameter("@CustomerDaxue", SqlDbType.NVarChar,50),
                    new SqlParameter("@CustomerXueli", SqlDbType.NVarChar,50),
                    new SqlParameter("@CustomerSex", SqlDbType.Int,4),
                    new SqlParameter("@CustomerBirthday", SqlDbType.NVarChar,50),
                    new SqlParameter("@CustomerWorkplace", SqlDbType.NVarChar,100),
                    new SqlParameter("@CustomerEmail", SqlDbType.NVarChar,50),
                    new SqlParameter("@CustomerQQ", SqlDbType.NVarChar,15)};
            parameters[0].Value = model.Password;
            parameters[1].Value = model.CustomerState;
            parameters[2].Value = model.CustomerName;
            parameters[3].Value = model.CustomerXiaoxue;
            parameters[4].Value = model.CustomerChuzhong;
            parameters[5].Value = model.CustomerGaozhong;
            parameters[6].Value = model.CustomerDaxue;
            parameters[7].Value = model.CustomerXueli;
            parameters[8].Value = model.CustomerSex;
            parameters[9].Value = model.CustomerBirthday;
            parameters[10].Value = model.CustomerWorkplace;
            parameters[11].Value = model.CustomerEmail;
            parameters[12].Value = model.CustomerQQ;

            object obj = DbHelperSQL.GetSingle(strSql.ToString(),parameters);
            if (obj == null)
            {
                return 0;
            }
            else
            {
                return Convert.ToInt32(obj);
            }
        }
예제 #5
0
파일: Log.cs 프로젝트: TgcqiTeam/Surfing
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(Matisoft.Model.Log model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into Log(");
            strSql.Append("LogID,CustomerID,TimeDate,Contents,LogImageUrl,LogImageConUrl,LogState,LogShareTime,LogZanTime)");
            strSql.Append(" values (");
            strSql.Append("@LogID,@CustomerID,@TimeDate,@Contents,@LogImageUrl,@LogImageConUrl,@LogState,@LogShareTime,@LogZanTime)");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters = {
                    new SqlParameter("@LogID", SqlDbType.Int,4),
                    new SqlParameter("@CustomerID", SqlDbType.Int,4),
                    new SqlParameter("@TimeDate", SqlDbType.DateTime),
                    new SqlParameter("@Contents", SqlDbType.NChar,10),
                    new SqlParameter("@LogImageUrl", SqlDbType.NVarChar,100),
                    new SqlParameter("@LogImageConUrl", SqlDbType.NVarChar,100),
                    new SqlParameter("@LogState", SqlDbType.Int,4),
                    new SqlParameter("@LogShareTime", SqlDbType.Int,4),
                    new SqlParameter("@LogZanTime", SqlDbType.Int,4)};
            parameters[0].Value = model.LogID;
            parameters[1].Value = model.CustomerID;
            parameters[2].Value = model.TimeDate;
            parameters[3].Value = model.Contents;
            parameters[4].Value = model.LogImageUrl;
            parameters[5].Value = model.LogImageConUrl;
            parameters[6].Value = model.LogState;
            parameters[7].Value = model.LogShareTime;
            parameters[8].Value = model.LogZanTime;

            object obj = DbHelperSQL.GetSingle(strSql.ToString(),parameters);
            if (obj == null)
            {
                return 0;
            }
            else
            {
                return Convert.ToInt32(obj);
            }
        }
예제 #6
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Matisoft.Model.State_dir model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into State_dir(");
            strSql.Append("State,Operation)");
            strSql.Append(" values (");
            strSql.Append("@State,@Operation)");
            SqlParameter[] parameters = {
                    new SqlParameter("@State", SqlDbType.Int,4),
                    new SqlParameter("@Operation", SqlDbType.NVarChar,50)};
            parameters[0].Value = model.State;
            parameters[1].Value = model.Operation;

            int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
예제 #7
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Matisoft.Model.Sex_dir model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into Sex_dir(");
            strSql.Append("CustomerSex,CustomerSex_exp)");
            strSql.Append(" values (");
            strSql.Append("@CustomerSex,@CustomerSex_exp)");
            SqlParameter[] parameters = {
                    new SqlParameter("@CustomerSex", SqlDbType.Int,4),
                    new SqlParameter("@CustomerSex_exp", SqlDbType.NChar,10)};
            parameters[0].Value = model.CustomerSex;
            parameters[1].Value = model.CustomerSex_exp;

            int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
예제 #8
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Matisoft.Model.Customer model)
 {
     return dal.Update(model);
 }
예제 #9
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int Add(Matisoft.Model.Customer model)
 {
     return dal.Add(model);
 }
예제 #10
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Matisoft.Model.State_dir model)
 {
     return dal.Update(model);
 }
예제 #11
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public bool Add(Matisoft.Model.State_dir model)
 {
     return dal.Add(model);
 }
예제 #12
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Matisoft.Model.State_dir model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("update State_dir set ");
            strSql.Append("Operation=@Operation");
            strSql.Append(" where State=@State ");
            SqlParameter[] parameters = {
                    new SqlParameter("@Operation", SqlDbType.NVarChar,50),
                    new SqlParameter("@State", SqlDbType.Int,4)};
            parameters[0].Value = model.Operation;
            parameters[1].Value = model.State;

            int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
예제 #13
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Matisoft.Model.Administrator model)
 {
     return dal.Update(model);
 }
예제 #14
0
파일: Log.cs 프로젝트: TgcqiTeam/Surfing
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Matisoft.Model.Log model)
 {
     return dal.Update(model);
 }
예제 #15
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Matisoft.Model.Operation_dir model)
 {
     return dal.Update(model);
 }
예제 #16
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Matisoft.Model.FollowTable model)
 {
     return dal.Update(model);
 }
예제 #17
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int Add(Matisoft.Model.FollowTable model)
 {
     return dal.Add(model);
 }
예제 #18
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int Add(Matisoft.Model.Comment model)
 {
     return dal.Add(model);
 }
예제 #19
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Matisoft.Model.Comment model)
 {
     return dal.Update(model);
 }
예제 #20
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int Add(Matisoft.Model.Administrator model)
 {
     return dal.Add(model);
 }
예제 #21
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Matisoft.Model.Administrator model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("update Administrator set ");
            strSql.Append("Admin=@Admin,");
            strSql.Append("Password=@Password,");
            strSql.Append("AdminiEmail=@AdminiEmail,");
            strSql.Append("AdminState=@AdminState,");
            strSql.Append("AuthorityID=@AuthorityID");
            strSql.Append(" where id=@id");
            SqlParameter[] parameters = {
                    new SqlParameter("@Admin", SqlDbType.NVarChar,100),
                    new SqlParameter("@Password", SqlDbType.NVarChar,50),
                    new SqlParameter("@AdminiEmail", SqlDbType.NVarChar,50),
                    new SqlParameter("@AdminState", SqlDbType.Int,4),
                    new SqlParameter("@AuthorityID", SqlDbType.Int,4),
                    new SqlParameter("@id", SqlDbType.Int,4)};
            parameters[0].Value = model.Admin;
            parameters[1].Value = model.Password;
            parameters[2].Value = model.AdminiEmail;
            parameters[3].Value = model.AdminState;
            parameters[4].Value = model.AuthorityID;
            parameters[5].Value = model.id;

            int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
예제 #22
0
파일: Affire.cs 프로젝트: TgcqiTeam/Surfing
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int Add(Matisoft.Model.Affire model)
 {
     return dal.Add(model);
 }
예제 #23
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public bool Add(Matisoft.Model.Operation_dir model)
 {
     return dal.Add(model);
 }
예제 #24
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Matisoft.Model.Comment model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("update Comment set ");
            strSql.Append("Contents=@Contents,");
            strSql.Append("CustomerID=@CustomerID,");
            strSql.Append("CommentState=@CommentState,");
            strSql.Append("TimeDate=@TimeDate");
            strSql.Append(" where id=@id");
            SqlParameter[] parameters = {
                    new SqlParameter("@Contents", SqlDbType.NVarChar,200),
                    new SqlParameter("@CustomerID", SqlDbType.Int,4),
                    new SqlParameter("@CommentState", SqlDbType.Int,4),
                    new SqlParameter("@TimeDate", SqlDbType.DateTime),
                    new SqlParameter("@id", SqlDbType.Int,4)};
            parameters[0].Value = model.Contents;
            parameters[1].Value = model.CustomerID;
            parameters[2].Value = model.CommentState;
            parameters[3].Value = model.TimeDate;
            parameters[4].Value = model.id;

            int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
예제 #25
0
파일: Log.cs 프로젝트: TgcqiTeam/Surfing
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Matisoft.Model.Log model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("update Log set ");
            strSql.Append("LogID=@LogID,");
            strSql.Append("CustomerID=@CustomerID,");
            strSql.Append("TimeDate=@TimeDate,");
            strSql.Append("Contents=@Contents,");
            strSql.Append("LogImageUrl=@LogImageUrl,");
            strSql.Append("LogImageConUrl=@LogImageConUrl,");
            strSql.Append("LogState=@LogState,");
            strSql.Append("LogShareTime=@LogShareTime,");
            strSql.Append("LogZanTime=@LogZanTime");
            strSql.Append(" where id=@id");
            SqlParameter[] parameters = {
                    new SqlParameter("@LogID", SqlDbType.Int,4),
                    new SqlParameter("@CustomerID", SqlDbType.Int,4),
                    new SqlParameter("@TimeDate", SqlDbType.DateTime),
                    new SqlParameter("@Contents", SqlDbType.NChar,10),
                    new SqlParameter("@LogImageUrl", SqlDbType.NVarChar,100),
                    new SqlParameter("@LogImageConUrl", SqlDbType.NVarChar,100),
                    new SqlParameter("@LogState", SqlDbType.Int,4),
                    new SqlParameter("@LogShareTime", SqlDbType.Int,4),
                    new SqlParameter("@LogZanTime", SqlDbType.Int,4),
                    new SqlParameter("@id", SqlDbType.Int,4)};
            parameters[0].Value = model.LogID;
            parameters[1].Value = model.CustomerID;
            parameters[2].Value = model.TimeDate;
            parameters[3].Value = model.Contents;
            parameters[4].Value = model.LogImageUrl;
            parameters[5].Value = model.LogImageConUrl;
            parameters[6].Value = model.LogState;
            parameters[7].Value = model.LogShareTime;
            parameters[8].Value = model.LogZanTime;
            parameters[9].Value = model.id;

            int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
예제 #26
0
파일: Affire.cs 프로젝트: TgcqiTeam/Surfing
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Matisoft.Model.Affire model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("update Affire set ");
            strSql.Append("CustomerEmail=@CustomerEmail,");
            strSql.Append("TimeDate=@TimeDate,");
            strSql.Append("OperationID=@OperationID");
            strSql.Append(" where id=@id");
            SqlParameter[] parameters = {
                    new SqlParameter("@CustomerEmail", SqlDbType.NVarChar,50),
                    new SqlParameter("@TimeDate", SqlDbType.DateTime),
                    new SqlParameter("@OperationID", SqlDbType.Int,4),
                    new SqlParameter("@id", SqlDbType.Int,4)};
            parameters[0].Value = model.CustomerEmail;
            parameters[1].Value = model.TimeDate;
            parameters[2].Value = model.OperationID;
            parameters[3].Value = model.id;

            int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
예제 #27
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Matisoft.Model.Authoirty_dir model)
 {
     return dal.Update(model);
 }
예제 #28
0
파일: Log.cs 프로젝트: TgcqiTeam/Surfing
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int Add(Matisoft.Model.Log model)
 {
     return dal.Add(model);
 }
예제 #29
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Matisoft.Model.Customer model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("update Customer set ");
            strSql.Append("Password=@Password,");
            strSql.Append("CustomerState=@CustomerState,");
            strSql.Append("CustomerName=@CustomerName,");
            strSql.Append("CustomerXiaoxue=@CustomerXiaoxue,");
            strSql.Append("CustomerChuzhong=@CustomerChuzhong,");
            strSql.Append("CustomerGaozhong=@CustomerGaozhong,");
            strSql.Append("CustomerDaxue=@CustomerDaxue,");
            strSql.Append("CustomerXueli=@CustomerXueli,");
            strSql.Append("CustomerSex=@CustomerSex,");
            strSql.Append("CustomerBirthday=@CustomerBirthday,");
            strSql.Append("CustomerWorkplace=@CustomerWorkplace,");
            strSql.Append("CustomerEmail=@CustomerEmail,");
            strSql.Append("CustomerQQ=@CustomerQQ");
            strSql.Append(" where CustomerID=@CustomerID");
            SqlParameter[] parameters = {
                    new SqlParameter("@Password", SqlDbType.NVarChar,50),
                    new SqlParameter("@CustomerState", SqlDbType.Int,4),
                    new SqlParameter("@CustomerName", SqlDbType.NVarChar,20),
                    new SqlParameter("@CustomerXiaoxue", SqlDbType.NVarChar,50),
                    new SqlParameter("@CustomerChuzhong", SqlDbType.NVarChar,50),
                    new SqlParameter("@CustomerGaozhong", SqlDbType.NVarChar,50),
                    new SqlParameter("@CustomerDaxue", SqlDbType.NVarChar,50),
                    new SqlParameter("@CustomerXueli", SqlDbType.NVarChar,50),
                    new SqlParameter("@CustomerSex", SqlDbType.Int,4),
                    new SqlParameter("@CustomerBirthday", SqlDbType.NVarChar,50),
                    new SqlParameter("@CustomerWorkplace", SqlDbType.NVarChar,100),
                    new SqlParameter("@CustomerEmail", SqlDbType.NVarChar,50),
                    new SqlParameter("@CustomerQQ", SqlDbType.NVarChar,15),
                    new SqlParameter("@CustomerID", SqlDbType.Int,4)};
            parameters[0].Value = model.Password;
            parameters[1].Value = model.CustomerState;
            parameters[2].Value = model.CustomerName;
            parameters[3].Value = model.CustomerXiaoxue;
            parameters[4].Value = model.CustomerChuzhong;
            parameters[5].Value = model.CustomerGaozhong;
            parameters[6].Value = model.CustomerDaxue;
            parameters[7].Value = model.CustomerXueli;
            parameters[8].Value = model.CustomerSex;
            parameters[9].Value = model.CustomerBirthday;
            parameters[10].Value = model.CustomerWorkplace;
            parameters[11].Value = model.CustomerEmail;
            parameters[12].Value = model.CustomerQQ;
            parameters[13].Value = model.CustomerID;

            int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
예제 #30
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public bool Add(Matisoft.Model.Authoirty_dir model)
 {
     return dal.Add(model);
 }