示例#1
0
 public List <ct_GrupoEmpresarial_plancta_nivel_Info> Get_list_GrupoEmpresarial_plancta_nivel()
 {
     try
     {
         List <ct_GrupoEmpresarial_plancta_nivel_Info> Lst = new List <ct_GrupoEmpresarial_plancta_nivel_Info>();
         EntitiesDBConta oEnti = new EntitiesDBConta();
         var             Query = from q in oEnti.ct_GrupoEmpresarial_plancta_nivel
                                 select q;
         foreach (var item in Query)
         {
             ct_GrupoEmpresarial_plancta_nivel_Info Obj = new ct_GrupoEmpresarial_plancta_nivel_Info();
             Obj.IdNivelCta_gr     = item.IdNivelCta_gr;
             Obj.nv_NumDigitos_gr  = item.nv_NumDigitos_gr;
             Obj.nv_Descripcion_gr = item.nv_Descripcion_gr;
             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());
     }
 }
示例#2
0
 public Boolean GrabarDB(ct_GrupoEmpresarial_plancta_nivel_Info Info, ref int ID)
 {
     try
     {
         List <ct_GrupoEmpresarial_plancta_nivel_Info> Lst = new List <ct_GrupoEmpresarial_plancta_nivel_Info>();
         using (EntitiesDBConta Context = new EntitiesDBConta())
         {
             var Address = new ct_GrupoEmpresarial_plancta_nivel();
             ID = Get_Id();
             Address.IdNivelCta_gr     = ID;
             Address.nv_NumDigitos_gr  = Info.nv_NumDigitos_gr;
             Address.nv_Descripcion_gr = Info.nv_Descripcion_gr;
             Context.ct_GrupoEmpresarial_plancta_nivel.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());
     }
 }
示例#3
0
 public Boolean ModificarDB(ct_GrupoEmpresarial_plancta_nivel_Info info)
 {
     try
     {
         using (EntitiesDBConta context = new EntitiesDBConta())
         {
             var contact = context.ct_GrupoEmpresarial_plancta_nivel.FirstOrDefault(minfo => minfo.IdNivelCta_gr == info.IdNivelCta_gr);
             if (contact != null)
             {
                 contact.nv_Descripcion_gr = info.nv_Descripcion_gr;
                 contact.nv_NumDigitos_gr  = info.nv_NumDigitos_gr;
                 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());
     }
 }
 private void UltraGrid_Nivel_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
 {
     try
     {
         nivel_I = (ct_GrupoEmpresarial_plancta_nivel_Info)UltraGrid_Nivel.GetFocusedRow();
     }
     catch (Exception ex)
     {
         Log_Error_bus.Log_Error(ex.ToString());
         MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
示例#5
0
        public void set_Info(ct_GrupoEmpresarial_plancta_nivel_Info _info)
        {
            try
            {
                lblnivel.Text       = _info.IdNivelCta_gr.ToString();
                txtdescripcion.Text = _info.nv_Descripcion_gr;
                num_digitos.Value   = _info.nv_NumDigitos_gr;

                Info = _info;
            }
            catch (Exception ex)
            { Log_Error_bus.Log_Error(ex.ToString());
              MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); }
        }
示例#6
0
 public Boolean ModificarDB(ct_GrupoEmpresarial_plancta_nivel_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("", "Get_IdCta", ex.Message), ex)
               {
                   EntityType = typeof(ct_GrupoEmpresarial_plancta_Bus)
               };
     }
 }
示例#7
0
 void LimpiarDatos()
 {
     try
     {
         _Accion             = Cl_Enumeradores.eTipo_action.grabar;
         Info                = new ct_GrupoEmpresarial_plancta_nivel_Info();
         lblnivel.Text       = "";
         txtdescripcion.Text = "";
         num_digitos.Value   = 0;
     }
     catch (Exception ex)
     {
         Log_Error_bus.Log_Error(ex.ToString());
         MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
示例#8
0
        public ct_GrupoEmpresarial_plancta_nivel_Info Get_Info_GrupoEmpresarial_plancta_nivel(int IdNivelCta_gr)
        {
            EntitiesDBConta oEnti = new EntitiesDBConta();

            try
            {
                ct_GrupoEmpresarial_plancta_nivel_Info Info = new ct_GrupoEmpresarial_plancta_nivel_Info();
                var Objeto = oEnti.ct_GrupoEmpresarial_plancta_nivel.First(var => var.IdNivelCta_gr == IdNivelCta_gr);
                Info.IdNivelCta_gr     = Objeto.IdNivelCta_gr;
                Info.nv_NumDigitos_gr  = Objeto.nv_NumDigitos_gr;
                Info.nv_Descripcion_gr = Objeto.nv_Descripcion_gr;
                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);
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                mensaje = ex.ToString();
                throw new Exception(ex.ToString());
            }
        }