Beispiel #1
0
        /// <summary>
        /// 删除数据
        /// </summary>
        /// <param name="id">数据的编号</param>
        /// <returns></returns>
        public async Task <ResponseData> DeleteTask(int id)
        {
            var selectData = Db.SingleOrDefault <TaskData>("where id = @0", id);

            if (selectData == null)
            {
                return(new ResponseData("删除的数据不存在", "", StatusCode.Fail));
            }
            JobKey jobKey = new JobKey(selectData.Task_Name);
            await scheduler.DeleteJob(jobKey);

            await Db.UpdateAsync <TaskData>("set Task_Isexists = 0 where Id = @0", id);

            //var Data1 = Db.Page<TaskData>(page.PageNumber, page.PageSize, "where Task_Isexists = 1");
            return(new ResponseData("删除任务成功", "", StatusCode.Success));
        }
 public async Task <int> Update(Office office)
 {
     return(await db.UpdateAsync(office));
 }
 public async Task <int> Update(Employee employee)
 {
     return(await db.UpdateAsync(employee));
 }
 public async Task <int> Update(Department department)
 {
     return(await db.UpdateAsync(department));
 }
Beispiel #5
0
 public async Task <int> Update(JobTitle jobTitle)
 {
     return(await db.UpdateAsync(jobTitle));
 }