public Boolean GuardarDB(tb_sis_reporte_Info Info) { try { List <tb_sis_reporte_Info> Lst = new List <tb_sis_reporte_Info>(); using (EntitiesGeneral Context = new EntitiesGeneral()) { var Address = new tb_sis_reporte(); Address.CodReporte = Info.CodReporte; Address.Nombre = Info.Nombre; Address.NombreCorto = Info.NombreCorto; Address.Modulo = Info.Modulo; Address.VistaRpt = Info.VistaRpt; Address.Formulario = Info.Formulario; Address.Orden = Info.Orden; Address.Estado = Info.Estado; Address.se_Muestra_Admin_Reporte = Info.se_Muestra_Admin_Reporte; Address.Observacion = Info.Observacion; Address.imagen = Info.imgByt; Address.nom_Asembly = Info.nom_Asembly; Address.VersionActual = Info.VersionActual; Address.Tipo_Balance = Info.Tipo_Balance; Address.SQuery = Info.SQuery; Address.Class_NomReporte = Info.Class_NomReporte; Address.Class_Info = Info.Class_Info; Address.Class_Data = Info.Class_Data; Address.Class_Bus = Info.Class_Bus; Address.Store_proce_rpt = Info.Store_proce_rpt; Context.tb_sis_reporte.Add(Address); Context.SaveChanges(); } return(true); } catch (Exception ex) { string arreglo = ToString(); tb_sis_Log_Error_Vzen_Data oDataLog = new tb_sis_Log_Error_Vzen_Data(); tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now); oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje); mensaje = ex.ToString() + " " + ex.Message; throw new Exception(ex.ToString()); } }
public tb_sis_reporte_Info get_info(string CodReporte) { try { tb_sis_reporte_Info info = new tb_sis_reporte_Info(); using (Entities_general Context = new Entities_general()) { tb_sis_reporte Entity = Context.tb_sis_reporte.FirstOrDefault(q => q.CodReporte == CodReporte); if (Entity == null) { return(null); } info = new tb_sis_reporte_Info { CodReporte = Entity.CodReporte, observacion = Entity.observacion, orden = Entity.orden, estado = Entity.estado, mvc_accion = Entity.mvc_accion, mvc_area = Entity.mvc_area, mvc_controlador = Entity.mvc_controlador, nom_reporte = Entity.nom_reporte, rpt_clase_data = Entity.rpt_clase_data, rpt_clase_info = Entity.rpt_clase_info, rpt_clase_bus = Entity.rpt_clase_bus, rpt_clase_rpt = Entity.rpt_clase_rpt, rpt_store_procedure = Entity.rpt_store_procedure, rpt_usa_store_procedure = Entity.rpt_usa_store_procedure, rpt_vista = Entity.rpt_vista, se_muestra_administrador_reportes = Entity.se_muestra_administrador_reportes, rpt_muestra_disenador_reporte = Entity.se_muestra_administrador_reportes, CodModulo = Entity.CodModulo, Nom_Carpeta = Entity.tb_modulo.Nom_Carpeta }; } return(info); } catch (Exception) { throw; } }
public bool modificarDB(tb_sis_reporte_Info info) { try { using (Entities_general Context = new Entities_general()) { tb_sis_reporte Entity = Context.tb_sis_reporte.FirstOrDefault(q => q.CodReporte == info.CodReporte); if (Entity == null) { return(false); } Entity.observacion = info.observacion; Entity.orden = info.orden; Entity.estado = info.estado == true; Entity.mvc_accion = info.mvc_accion; Entity.mvc_area = info.mvc_area; Entity.mvc_controlador = info.mvc_controlador; Entity.nom_reporte = info.nom_reporte; Entity.rpt_clase_data = info.rpt_clase_data; Entity.rpt_clase_info = info.rpt_clase_info; Entity.rpt_clase_bus = info.rpt_clase_bus; Entity.rpt_clase_rpt = info.rpt_clase_rpt; Entity.rpt_store_procedure = info.rpt_store_procedure; Entity.rpt_usa_store_procedure = info.rpt_usa_store_procedure; Entity.rpt_vista = info.rpt_vista; Entity.se_muestra_administrador_reportes = info.se_muestra_administrador_reportes; Entity.Se_Mustra_Disenador_rpt = info.se_muestra_administrador_reportes; Context.SaveChanges(); } return(true); } catch (Exception) { throw; } }
public bool guardarDB(tb_sis_reporte_Info info) { try { using (Entities_general Context = new Entities_general()) { tb_sis_reporte Entity = new tb_sis_reporte { CodModulo = info.CodModulo, CodReporte = info.CodReporte, observacion = info.observacion, orden = info.orden, estado = info.estado == true, mvc_accion = info.mvc_accion, mvc_area = info.mvc_area, mvc_controlador = info.mvc_controlador, nom_reporte = info.nom_reporte, rpt_clase_data = info.rpt_clase_data, rpt_clase_info = info.rpt_clase_info, rpt_clase_bus = info.rpt_clase_bus, rpt_clase_rpt = info.rpt_clase_rpt, rpt_store_procedure = info.rpt_store_procedure, rpt_usa_store_procedure = info.rpt_usa_store_procedure, rpt_vista = info.rpt_vista, se_muestra_administrador_reportes = info.se_muestra_administrador_reportes, Se_Mustra_Disenador_rpt = info.rpt_muestra_disenador_reporte, }; Context.tb_sis_reporte.Add(Entity); Context.SaveChanges(); } return(true); } catch (Exception) { throw; } }