Example #1
0
 /// <summary>
 /// 添加用户计划任务
 /// </summary>
 /// <param name="model">The model.</param>
 /// <returns>System.Int32.</returns>
 public TaskPlanModel AddUserTaskPlan(TaskPlanModel model)
 {
     if (model.id == 0)
     {
         int taskid = dal.AddUserTaskPlan(model);
         if (taskid > 0)
         {
             return(FindByUserTaskPlanInfo(model.userid, taskid));
         }
     }
     else
     {
         if (dal.UpdateUserTaskPlan(model) > 0)
         {
             return(FindByUserTaskPlanInfo(model.userid, Convert.ToInt32(model.id)));
         }
     }
     return(null);
 }