public Boolean ModificarDB(ro_CatalogoTipo_Info Info, string msj) { try { using (EntitiesRoles context = new EntitiesRoles()) { var contact = context.ro_catalogoTipo.First(var => var.IdTipoCatalogo == Info.IdTipoCatalogo); contact.tc_Descripcion = Info.tc_Descripcion; //contact.ca_orden = Info.ca_orden; 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); mensaje = ex.InnerException + " " + ex.Message; oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje); throw new Exception(ex.InnerException.ToString()); } }
public Boolean GuardarDB(ref ro_CatalogoTipo_Info Info) { try { List <ro_CatalogoTipo_Info> Lst = new List <ro_CatalogoTipo_Info>(); using (EntitiesRoles Context = new EntitiesRoles()) { var Address = new ro_catalogoTipo(); Address.IdTipoCatalogo = Info.IdTipoCatalogo = getId(); Address.Codigo = Info.Codigo; Address.tc_Descripcion = Info.tc_Descripcion; Context.ro_catalogoTipo.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); mensaje = ex.InnerException + " " + ex.Message; oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje); throw new Exception(ex.InnerException.ToString()); } }
public List <ro_CatalogoTipo_Info> Get_List_CatalogoTipo(int IdEmpresa) { List <ro_CatalogoTipo_Info> Lst = new List <ro_CatalogoTipo_Info>(); try { EntitiesRoles oEnti = new EntitiesRoles(); var Query = from q in oEnti.ro_catalogoTipo select q; foreach (var item in Query) { ro_CatalogoTipo_Info Obj = new ro_CatalogoTipo_Info(); Obj.IdTipoCatalogo = item.IdTipoCatalogo; Obj.Codigo = item.Codigo; Obj.tc_Descripcion = item.tc_Descripcion; Lst.Add(Obj); } return(Lst); } 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); mensaje = ex.InnerException + " " + ex.Message; oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje); throw new Exception(ex.InnerException.ToString()); } }
private void lstbox_TipoCatalogo_SelectedValueChanged(object sender, EventArgs e) { try { infoTipo = (ro_CatalogoTipo_Info)lstbox_TipoCatalogo.SelectedItem; gridViewCatalogo.SelectRows(0, 1); } catch (Exception ex) { MessageBox.Show(ex.Message); Log_Error_bus.Log_Error(ex.ToString()); } }
public Boolean Modificar(ro_CatalogoTipo_Info Info, string msj) { try { return(odata.ModificarDB(Info, msj)); } catch (Exception ex) { Core.Erp.Info.Log_Exception.LoggingManager.Logger.Log(Core.Erp.Info.Log_Exception.LoggingCategory.Error, ex.Message); throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "Modificar", ex.Message), ex) { EntityType = typeof(ro_CatalogoTipo_Bus) }; } }
public Boolean GuardarDB(ref ro_CatalogoTipo_Info Info) { try { return(odata.GuardarDB(ref Info)); } catch (Exception ex) { Core.Erp.Info.Log_Exception.LoggingManager.Logger.Log(Core.Erp.Info.Log_Exception.LoggingCategory.Error, ex.Message); throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "GuardarDB", ex.Message), ex) { EntityType = typeof(ro_CatalogoTipo_Bus) }; } }
public ro_CatalogoTipo_Info Get_Info_CatalogoTipo(int IdTipoCatalogo) { EntitiesRoles oEnti = new EntitiesRoles(); ro_CatalogoTipo_Info Info = new ro_CatalogoTipo_Info(); try { var Objeto = oEnti.ro_catalogoTipo.First(var => var.IdTipoCatalogo == IdTipoCatalogo); Info.IdTipoCatalogo = Objeto.IdTipoCatalogo; Info.Codigo = Objeto.Codigo; Info.tc_Descripcion = Objeto.tc_Descripcion; return(Info); } 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); mensaje = ex.InnerException + " " + ex.Message; oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje); throw new Exception(ex.InnerException.ToString()); } }