public WipTaskSchedule(int contentID, DateTime targetDate) { _targetDate = MyDateTime.GetDateOfMinusBusinessDays(targetDate, -1); var dbml = new ProjectModelDbEntities(); _task = dbml.tblWipTasks.First(x => x.ContentID == contentID); _scheduleStartDate = DateTime.Today; }
private string GetContentName(int contentID) { string contents = ""; tblWipTask wiptask = _dbml.tblWipTasks.FirstOrDefault(x => x.ContentID == contentID); if (wiptask != null) { contents = wiptask.PublicContentName; } return(contents); }
private Sales_WipPublic GetNewTask(tblWipTask task) { var newTask = new Sales_WipPublic { JobID = _jobID, estRevID = 0, quoteRevID = 0, woID = 0, invoiceID = 0, Priority = 0, ContentID = task.ContentID, Contents = task.ContentName, Status = 0, ScheduleStartDate = DateTime.Today, ScheduleFinishDate = DateTime.Today.AddDays(task.LeadTime), Responsible = _employeeID, CreatedBy = _employeeID, LastUpdatedAt = DateTime.Now, LastUpdatedBy = _employeeID }; return(newTask); }
public WipTaskContent(int contentID) { _dbml = new ProjectModelDbEntities(); _taskContent = _dbml.tblWipTasks.First(x => x.ContentID == contentID); }