示例#1
0
        public int UpdatePasswordByID(UsersModel Model)
        {
            String sql = "UPDATE Users SET uPwd=@uPwd WHERE UID=@UID";

            return(DataBaseOpen.NoQuery(sql, new SqlParameter[] {
                new SqlParameter("@uPwd", Model.uPwd),
                new SqlParameter("@UID", Model.UID),
            }));
        }
示例#2
0
        public int UpdateByModel(RootMenuModel Model)
        {
            String sql = "UPDATE RootMenu SET Title=@Title,ParentID=@ParentID,Link=@Link WHERE ID=@ID";

            return(DataBaseOpen.NoQuery(sql, new SqlParameter[] {
                new SqlParameter("@Title", Model.Title),
                new SqlParameter("@ParentID", Model.ParentID),
                new SqlParameter("@Link", Model.Link),
            }));
        }
示例#3
0
        public int InsertByModel(RootMenuModel Model)
        {
            String sql = "INSERT INTO RootMenu(Title,ParentID,Link) VALUES(@Title,@ParentID,@Link)";

            return(DataBaseOpen.NoQuery(sql, new SqlParameter[] {
                new SqlParameter("@Title", Model.Title),
                new SqlParameter("@ParentID", Model.ParentID),
                new SqlParameter("@Link", Model.Link),
            }));
        }
示例#4
0
        public int UpdateByModel(UsersModel Model)
        {
            String sql = "UPDATE Users SET uPwd=@uPwd,UName=@UName WHERE UID=@UID";

            return(DataBaseOpen.NoQuery(sql, new SqlParameter[] {
                new SqlParameter("@UID", Model.UID),
                new SqlParameter("@uPwd", Model.uPwd),
                new SqlParameter("@UName", Model.UName),
            }));
        }
示例#5
0
        public int InsertByModel(UsersModel Model)
        {
            String sql = "INSERT INTO Users(UCode,uPwd,UName) VALUES(@UCode,@uPwd,@UName)";

            return(DataBaseOpen.NoQuery(sql, new SqlParameter[] {
                new SqlParameter("@UID", Model.UID),
                new SqlParameter("@UCode", Model.UCode),
                new SqlParameter("@uPwd", Model.uPwd),
                new SqlParameter("@UName", Model.UName),
            }));
        }
示例#6
0
        public int UpdateByModel(RoteInfoModel Model)
        {
            String sql = "UPDATE RoteInfo SET RID=@RIDRUID=@RUID,UID=@UID,RIP=@RIP,RCreateTime=@RCreateTime WHERE ID=@ID";

            return(DataBaseOpen.NoQuery(sql, new SqlParameter[] {
                new SqlParameter("@RID", Model.RID),
                new SqlParameter("@RUID", Model.RUID),
                new SqlParameter("@UID", Model.UID),
                new SqlParameter("@RIP", Model.RIP),
                new SqlParameter("@RCreateTime", Model.RCreateTime),
            }));
        }
示例#7
0
        public int InsertByModel(RoteInfoModel Model)
        {
            String sql = "INSERT INTO RoteInfo(RUID,UID,RIP,RCreateTime) VALUES(@RUID,@UID,@RIP,@RCreateTime)";

            return(DataBaseOpen.NoQuery(sql, new SqlParameter[] {
                new SqlParameter("@RID", Model.RID),
                new SqlParameter("@RUID", Model.RUID),
                new SqlParameter("@UID", Model.UID),
                new SqlParameter("@RIP", Model.RIP),
                new SqlParameter("@RCreateTime", Model.RCreateTime),
            }));
        }
示例#8
0
        public int UpdateByModel(ActionInfoModel Model)
        {
            String sql = "UPDATE ActionInfo SET AName=@AName,ADetail=@ADetail,ABeginTime=@ABeginTime,AEndTime=@AEndTime,AStatus=@AStatus WHERE AID=@AID";

            return(DataBaseOpen.NoQuery(sql, new SqlParameter[] {
                new SqlParameter("@AID", Model.AID),
                new SqlParameter("@AName", Model.AName),
                new SqlParameter("@ADetail", Model.ADetail),
                new SqlParameter("@ABeginTime", Model.ABeginTime),
                new SqlParameter("@AEndTime", Model.AEndTime),
                new SqlParameter("@AStatus", Model.AStatus),
            }));
        }
示例#9
0
        public int InsertByModel(ActionInfoModel Model)
        {
            String sql = "INSERT INTO ActionInfo(AName,ADetail,ABeginTime,AEndTime,AStatus) VALUES(@AName,@ADetail,@ABeginTime,@AEndTime,@AStatus)";

            return(DataBaseOpen.NoQuery(sql, new SqlParameter[] {
                new SqlParameter("@AID", Model.AID),
                new SqlParameter("@AName", Model.AName),
                new SqlParameter("@ADetail", Model.ADetail),
                new SqlParameter("@ABeginTime", Model.ABeginTime),
                new SqlParameter("@AEndTime", Model.AEndTime),
                new SqlParameter("@AStatus", Model.AStatus),
            }));
        }
示例#10
0
        public int InsertByModel(RoteUserModel Model)
        {
            String sql = "INSERT INTO RoteUser(AID,RUName,RUSex,RUAge,RUDetail,RUImGUrl) VALUES(@AID,@RUName,@RUSex,@RUAge,@RUDetail,@RUImGUrl)";

            return(DataBaseOpen.NoQuery(sql, new SqlParameter[] {
                new SqlParameter("@RUID", Model.RUID),
                new SqlParameter("@AID", Model.AID),
                new SqlParameter("@RUName", Model.RUName),
                new SqlParameter("@RUSex", Model.RUSex),
                new SqlParameter("@RUAge", Model.RUAge),
                new SqlParameter("@RUDetail", Model.RUDetail),
                new SqlParameter("@RUImGUrl", Model.RUImGUrl),
            }));
        }
示例#11
0
        public int UpdateByModel(RoteUserModel Model)
        {
            String ImgSql = Model.RUImGUrl == ""?"":" ,RUImGUrl=@RUImGUrl ";
            String sql    = "UPDATE RoteUser SET AID=@AID,RUName=@RUName,RUSex=@RUSex,RUAge=@RUAge,RUDetail=@RUDetail " + ImgSql + " WHERE RUID=@RUID";

            return(DataBaseOpen.NoQuery(sql, new SqlParameter[] {
                new SqlParameter("@RUID", Model.RUID),
                new SqlParameter("@AID", Model.AID),
                new SqlParameter("@RUName", Model.RUName),
                new SqlParameter("@RUSex", Model.RUSex),
                new SqlParameter("@RUAge", Model.RUAge),
                new SqlParameter("@RUDetail", Model.RUDetail),
                new SqlParameter("@RUImGUrl", Model.RUImGUrl),
            }));
        }
示例#12
0
        public int DeleteByID(int ID)
        {
            String sql = "DELETE  RoteUser WHERE RUID=" + ID;

            return(DataBaseOpen.NoQuery(sql));
        }
示例#13
0
        public int DeleteByID(int ID)
        {
            String sql = "DELETE  RootMenu WHERE ID=" + ID;

            return(DataBaseOpen.NoQuery(sql));
        }
示例#14
0
        public int DeleteByID(int ID)
        {
            String sql = "DELETE  ActionInfo WHERE AID=" + ID + " AND AStatus=1";

            return(DataBaseOpen.NoQuery(sql));
        }