public async Task <List <PlanMaterial> > GetMaterialByPlan(Guid planId) { using (var planDao = new PlanDao()) { return(await planDao.JoinPlanId(planId)); } }
public async Task EditPlan(Plan plan) { using (var planDao = new PlanDao()) { await planDao.EditAsync(plan); } }
public async Task CreatePlan(Plan plan) { using (var planDao = new PlanDao()) { await planDao.CreateAsync(plan); } }
/// <summary> /// 获取其他施工项目部,排除已选施工项目部 /// </summary> /// <param name="departId"></param> /// <returns></returns> public async Task <List <SysDepart> > GetOtherSysDepart(Guid?departId) { using (var planDao = new PlanDao()) { return(await planDao.GetOtherSysDepart(departId)); } }
public Task SubmitPlan(SysUser sysUser, int status) { using (var planDao = new PlanDao()) { throw new NotImplementedException(); } }
/// <summary> /// 获取单位项目中,未添加的施工项目部 /// </summary> /// <param name="projectId">项目编号</param> /// <returns></returns> public async Task <List <SysDepart> > GetNewSysDepart(Guid projectId) { using (var planDao = new PlanDao()) { return(await planDao.GetNewSysDepart(projectId)); } }
public async Task <List <Plan> > GetAllByProjectId(Guid id) { using (var planDao = new PlanDao()) { return(await planDao.GetAllAsync().Where(m => m.ProjectId == id).ToListAsync()); } }
public async Task RemovePlan(Guid id) { using (var planDao = new PlanDao()) { await planDao.RemoveAsync(id); } }
public List <PlanDto> GetAllPlan(int year, int month, Guid?sysDepartId, int pageSize, int pageIndex, bool asc) { using (var planDao = new PlanDao()) { return(planDao.JoinProject(year, month, sysDepartId).Result .Select(m => new PlanDto() { Id = m.Id, NodeNumber = m.NodeNumber, NextNodeNumber = m.FlowNode.NextNodeNumber, PlanId = m.Plan.Id, ProjectId = m.Plan.ProjectId, ProjectName = m.Plan.Project.ProjectName, StatusName = m.StatusName, SysDepartId = m.Plan.SysDepartId, SysDepartName = m.Plan.SysDepart.DepartName, SysDepartOwnerId = m.Plan.Project.SysDepartId, SysDepartOwnerName = m.Plan.Project.SysDepart.DepartName, UpdateTime = m.UpdateTime, CreateTime = m.CreateTime }) .OrderByDescending(m => m.CreateTime) .ThenBy(m => m.SysDepartId) .ToList()); } }
public void addNewPlan(PlanModel plan) { if (plan.component_id < 1) { throw new Exception("Please select component"); } if (String.IsNullOrEmpty(plan.model_name) || String.IsNullOrWhiteSpace(plan.model_name)) { throw new Exception("Plan model cannot leave empty"); } if (plan.plan_data < 0) { throw new Exception("Plan data must greater than 0"); } if (plan.plan_line < 0) { throw new Exception("Plan line must greater than 0"); } decimal model_id = BomModelModelDAO.getInstance().getIdByName(plan.model_name); plan.model_id = model_id; if (PlanDao.getInstance().isExist(plan)) { throw new Exception("Plan existed"); } PlanDao.getInstance().add(plan); }
public void deletePlan(PlanModel plan) { if (plan.plan_id < 1) { throw new Exception("Please select a plan first"); } PlanDao.getInstance().delete(plan); }
public List <Project> GetProject() { using (var planDao = new PlanDao()) { return(planDao.GetAllAsync() .Where(m => m.UpdateTime.Year == DateTime.Now.Year && m.UpdateTime.Month == DateTime.Now.Month) .Select(m => new Project() { ProjectName = m.Project.ProjectName }).ToList()); } }
private void cargarPlanes() { PlanDao plan = new PlanDao(); List <Plan> planesVigentes = plan.ListarPlanesMedicosVigentes(); foreach (Plan pln in planesVigentes) { ComboboxItem item = new ComboboxItem(); item.Text = pln.Descripcion; item.Value = pln.Codigo; this.cboPlan.Items.Add(item); } }
public ObtenerListadoPlanesResponse ObtenerListadoDePlanes() { var repo = new PlanDao(); var response = new ObtenerListadoPlanesResponse(); var planes = repo.ListarPlanesMedicosVigentes(); if (planes != null) { foreach (var plan in planes) { response.DescPlanes.Add(plan.Descripcion); } } return(response); }
public List <PlanDto> GetAllPlan(Guid sysDepart, string departType) { using (var planDao = new PlanDao()) { return(planDao.JoinDepart(sysDepart, departType).Select(m => new PlanDto() { Id = m.Id, ProjectId = m.ProjectId, ProjectName = m.Project.ProjectName, SysDepartOwnerName = m.Project.SysDepart.DepartName, SysDepartOwnerId = m.Project.SysDepartId, SysDepartId = m.SysDepartId, SysDepartName = m.SysDepart?.DepartName, CreateTime = m.CreateTime }) .OrderByDescending(m => m.CreateTime) .ThenBy(m => m.SysDepartId) .ToList()); } }
public long CountPlan() { return(PlanDao.Count()); }
public Plan GetPlan(Expression <Func <Plan, bool> > criteria) { return(PlanDao.Get(criteria)); }
public Plan GetPlan(int id) { return(PlanDao.Get(id)); }
public List <Plan> GetAllPlan(string conditions, string orders) { return(PlanDao.GetAll(conditions, orders)); }
public List <Plan> GetAllPlan(string orders) { return(PlanDao.GetAll(orders)); }
public List <Plan> GetAllPlan(Expression <Func <Plan, bool> > criteria) { return(PlanDao.GetAll(criteria)); }
public List <Plan> GetAllPlan() { return(PlanDao.GetAll()); }
public void DeletePlan(int id) { PlanDao.Delete(id); }
public void UpdatePlan(Plan entity) { PlanDao.Update(entity); }
public int SavePlan(Plan entity) { return(PlanDao.Save(entity)); }
public long CountPlan(Expression <Func <Plan, bool> > criteria) { return(PlanDao.Count(criteria)); }
public PlanService() { oPlanDao = new PlanDao(); }
public string GetDescripcionByCodigoPlan(int codigoPlan) { var repo = new PlanDao(); return(repo.GetDescripcionByCodigoPlan(codigoPlan)); }
public int GetCodigoPlanByDescripcion(string descripcion) { var repo = new PlanDao(); return(repo.GetCodigoPlanByDescripcion(descripcion)); }