Example #1
0
        public static int Editblog(int num, string heading, string body)
        {
            blogModel data = new blogModel
            {
                num     = num,
                heading = heading,
                body    = body
            };
            string sql = "update dbo.BlogData set heading='" + data.heading + "',body='" + data.body + "' where num=" + data.num + ";";

            return(SqlDataAccess.EditData <blogModel>(sql));
        }
Example #2
0
        public static int EditTask(int id, string taskName, Priority taskPriority, Status taskStatus, DateTime taskDeadline, string taskDetails)
        {
            DataLibrary.Models.TaskModel data = new Models.TaskModel
            {
                Id           = id,
                TaskName     = taskName,
                TaskPriority = taskPriority,
                TaskStatus   = taskStatus,
                TaskDeadline = taskDeadline,
                TaskDetails  = taskDetails
            };

            string sql = @"update dbo.Tasks set TaskName=@TaskName, TaskPriority=@TaskPriority, TaskStatus=@TaskStatus, TaskDeadline=@TaskDeadline, TaskDetails=@TaskDetails where Id=@Id";

            return(SqlDataAccess.EditData(sql, data));
        }