/// <summary> /// 状态 /// </summary> /// <param name="keyvalue"></param> /// <returns></returns> public ActionResult PostState(string keyvalue, string state) { var deptcycle = new DeptWorkCycleTaskBLL(); var user = OperatorProvider.Provider.Current(); try { var data = deptcycle.getEntity(keyvalue); if (state == "true") { data.workstate = "已完成"; } if (state == "false") { data.workstate = "进行中"; } if (state == "取消") { data.workstate = "已取消"; } deptcycle.SaveForm(data, user.UserId); return(Success("操作成功")); } catch (Exception ex) { return(Error(ex.Message)); } }
/// <summary> /// 获取数据 /// </summary> /// <param name="keyvalue"></param> /// <returns></returns> public ActionResult getEntity(string keyvalue) { var deptcycle = new DeptWorkCycleTaskBLL(); var data = deptcycle.getEntity(keyvalue); data.cycleDataStr = data.cycle + " " + data.cycledate; if (data.islastday) { data.cycleDataStr += " " + "最后一天"; } if (data.isweek) { data.cycleDataStr += " " + "跳过双休"; } if (data.isend) { data.cycleDataStr += " " + "截止"; } return(Content(data.ToJson())); }