public static Task GetTask(string code, bool includeLog = false, bool includeOrder = false, bool includeStockLog = false) { if (string.IsNullOrEmpty(code)) { return null; } ITask taskProvider = new TaskDal(EFContext.Instance); return taskProvider.Get(m=>m.Code==code, includeLog, includeOrder, includeStockLog); }
public static Task GetTaskByEpc(string epc, bool includeLog = false, bool includeOrder = false, bool includeStockLog = false) { if (string.IsNullOrEmpty(epc)) { return null; } ITask taskProvider = new TaskDal(EFContext.Instance); return taskProvider.Get(m => m.Ecp == epc, includeLog, includeOrder, includeStockLog); }
public static bool DeleteTask(int id) { if (id<=0) { return false; } ITask taskProvider = new TaskDal(EFContext.Instance); return taskProvider.Delete(id); }
public static Task GetTask(int id,bool includeLog=false,bool includeOrder=false,bool includeStockLog=false) { if (id<=0) { return null; } ITask taskProvider = new TaskDal(EFContext.Instance); return taskProvider.Get(m=>m.Id==id, includeLog, includeOrder, includeStockLog); }
public static IList<Task> GetTaskList(int page, int pageSize, Expression<Func<Task, bool>> expression, out int count, bool includeLog = false, bool includeOrder = false, bool includeStockLog = false) { ITask taskProvider = new TaskDal(EFContext.Instance); return taskProvider.GetList(page, pageSize, includeLog, includeOrder, includeStockLog,expression, out count); }
public static int Count(Expression<Func<Task, bool>> expression) { ITask taskProvider = new TaskDal(EFContext.Instance); return taskProvider.Count(expression); }
public static bool CheckEcpInUse(string ecp) { ITask taskProvider = new TaskDal(EFContext.Instance); return taskProvider.Count(m=>m.Ecp==ecp)>0; }
public static bool CheckCodeInUse(string code) { ITask taskProvider = new TaskDal(EFContext.Instance); return taskProvider.Count(m => m.Code == code) > 0; }
public static bool AddTask(Task info) { ITask taskProvider = new TaskDal(EFContext.Instance); return taskProvider.Add(info); }
public static bool UpdateTask(Task task, params string[] modifyParameters) { ITask taskProvider = new TaskDal(EFContext.Instance); return taskProvider.Update(task,modifyParameters); }