public List <ct_GrupoEmpresarial_grupocble_Info> Get_list_GrupoEmpresarial_grupocble() { try { List <ct_GrupoEmpresarial_grupocble_Info> Lst = new List <ct_GrupoEmpresarial_grupocble_Info>(); EntitiesDBConta oEnti = new EntitiesDBConta(); var Query = from q in oEnti.ct_GrupoEmpresarial_grupocble select q; foreach (var item in Query) { ct_GrupoEmpresarial_grupocble_Info Obj = new ct_GrupoEmpresarial_grupocble_Info(); Obj.IdGrupoCble_gr = item.IdGrupoCble_gr; Obj.gc_GrupoCble_gr = item.gc_GrupoCble_gr; Obj.gc_Orden = item.gc_Orden; Obj.gc_estado_financiero = item.gc_estado_financiero; Obj.gc_signo_operacion = item.gc_signo_operacion; 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); oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje); mensaje = ex.ToString(); throw new Exception(ex.ToString()); } }
public Boolean GuardarDB(ct_GrupoEmpresarial_grupocble_Info Info) { try { List <ct_GrupoEmpresarial_grupocble_Info> Lst = new List <ct_GrupoEmpresarial_grupocble_Info>(); using (EntitiesDBConta Context = new EntitiesDBConta()) { var Address = new ct_GrupoEmpresarial_grupocble(); Address.IdGrupoCble_gr = Info.IdGrupoCble_gr; Address.gc_GrupoCble_gr = Info.gc_GrupoCble_gr; Address.gc_Orden = Info.gc_Orden; Address.gc_estado_financiero = Info.gc_estado_financiero; Address.gc_signo_operacion = Info.gc_signo_operacion; Context.ct_GrupoEmpresarial_grupocble.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(); throw new Exception(ex.ToString()); } }
public Boolean ModificarDB(ct_GrupoEmpresarial_grupocble_Info info) { try { using (EntitiesDBConta context = new EntitiesDBConta()) { var contact = context.ct_GrupoEmpresarial_grupocble.FirstOrDefault(minfo => minfo.IdGrupoCble_gr == info.IdGrupoCble_gr); if (contact != null) { contact.IdGrupoCble_gr = info.IdGrupoCble_gr; contact.gc_GrupoCble_gr = info.gc_GrupoCble_gr; contact.gc_Orden = info.gc_Orden; contact.gc_estado_financiero = info.gc_estado_financiero; contact.gc_signo_operacion = info.gc_signo_operacion; 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(); throw new Exception(ex.ToString()); } }
public void set_Info(ct_GrupoEmpresarial_grupocble_Info info) { try { txt_id.Text = info.IdGrupoCble_gr; txt_grupo.Text = info.gc_GrupoCble_gr; txt_orden.Value = info.gc_Orden; cmb_estadoFinanciero.SelectedIndex = (info.gc_estado_financiero == "BG") ? 0 : 1; if (info.gc_signo_operacion == 1) { opt_suma.Checked = true; opt_resta.Checked = false; } else { opt_suma.Checked = false; opt_resta.Checked = true; } Gru_I = info; } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void UltraGrid_Grupo_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e) { try { Gru_I = (ct_GrupoEmpresarial_grupocble_Info)UltraGrid_Grupo.GetFocusedRow(); } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public Boolean ModificarDB(ct_GrupoEmpresarial_grupocble_Info info) { try { return(data.ModificarDB(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("", "ModificarDB", ex.Message), ex) { EntityType = typeof(ct_GrupoEmpresarial_grupocble_Bus) }; } }
void LimpiarDatos() { try { _Accion = Cl_Enumeradores.eTipo_action.grabar; Gru_I = new ct_GrupoEmpresarial_grupocble_Info(); txt_id.Text = ""; txt_grupo.Text = ""; txt_orden.Value = 0; opt_suma.Checked = true; } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public ct_GrupoEmpresarial_plancta_Info get_PlanCta() { try { _PlanCta_info.pc_Cuenta_gr = txt_cuenta.Text; _PlanCta_info.IdCuenta_gr = lblctapadre.Text.Trim() + txt_id.Text.ToString().Trim(); _PlanCta_info.IdCuentaPadre_gr = lblctapadre.Text; _PlanCta_info.IdNivelCta_gr = Convert.ToInt32(lblnivelcuenta.Text); GrupoCtble_I = (ct_GrupoEmpresarial_grupocble_Info)cmb_grupocbtle.SelectedItem;//ct_GrupoEmpresarial_grupocble_Info//ct_Grupocble_Info _PlanCta_info.IdGrupoCble_gr = GrupoCtble_I.IdGrupoCble_gr; _PlanCta_info.pc_Naturaleza = (cmb_naturaleza.SelectedItem.ToString().Trim() == "DEUDOR") ? "D" : "C"; _PlanCta_info.pc_Estado = (chk_activo.Checked) ? "A" : "I"; _PlanCta_info.pc_EsMovimiento = (chk_movimiento.Checked) ? "S" : "N"; return(_PlanCta_info); } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return(new ct_GrupoEmpresarial_plancta_Info()); } }