public void CreateDepartment(DepartamentoMirror depto) { VacationEntities entities = new VacationEntities(); Departamento departamento = new Departamento { activo = depto.Activo, departamentoid = depto.DepartamentoId, descripcion = depto.Descripcion }; entities.Departamentoes.Add(departamento); entities.SaveChanges(); }
public RedirectToRouteResult Departments(DepartamentoMirror departamentoMirror) { if(departamentoMirror.Descripcion == null) return RedirectToAction("Departments"); ServiceClient service = new ServiceClient(); departamentoMirror.Activo = true; service.CreateDepartment(departamentoMirror); service.Close(); return RedirectToAction("Departments"); }
public RedirectToRouteResult Departments(DepartamentoMirror departamentoMirror) { if (departamentoMirror.Descripcion == null) { return(RedirectToAction("Departments")); } ServiceClient service = new ServiceClient(); departamentoMirror.Activo = true; service.CreateDepartment(departamentoMirror); service.Close(); return(RedirectToAction("Departments")); }
public void Copy(DepartamentoMirror departamentoMirror) { DepartamentoId = departamentoMirror.DepartamentoId; Descripcion = departamentoMirror.Descripcion; Activo = departamentoMirror.Activo; }