public ProcessResult <PlanArea> InsertarPlanArea(PlanArea planArea) { ProcessResult <PlanArea> resultado = new ProcessResult <PlanArea>(); try { DA_PlanArea objDA = new DA_PlanArea(); if (objDA.ObtenerPlanAreaExiste((int)planArea.Id_PeriodoAcademico, (int)planArea.Id_Area, (int)planArea.Id_PlanEstudio, (int)planArea.Id_Grado) == 0) { planArea.Estado = "REGISTRADO"; planArea.FechaCreacion = DateTime.Now; objDA.InsertarPlanArea(planArea); resultado.IsProcess = true; } else { resultado.Message = "El Plan de estudio existe para el siguiente: Periodo, Area Curricular o Grado"; resultado.IsProcess = false; } } catch (Exception e) { resultado.IsSuccess = false; resultado.IsProcess = false; resultado.Message = e.Message; resultado.Exception = new ApplicationLayerException <BL_PlanArea>(e); } return(resultado); }
public ProcessResult <PlanArea> InsertarPlanArea(PlanArea planArea) { ProcessResult <PlanArea> resultado = new ProcessResult <PlanArea>(); try { DA_PlanArea objDA = new DA_PlanArea(); planArea.Estado = "REGISTRADO"; planArea.FechaCreacion = DateTime.Now; objDA.InsertarPlanArea(planArea); resultado.IsProcess = true; } catch (Exception e) { resultado.IsSuccess = false; resultado.IsProcess = false; resultado.Message = e.Message; resultado.Exception = new ApplicationLayerException <BL_PlanArea>(e); } return(resultado); }