Exemple #1
0
        private void Limpiar()
        {
            try
            {
                Set_Accion(Cl_Enumeradores.eTipo_action.grabar);
                Set_Controles();
                info_Registro         = new fa_registro_unidades_x_equipo_Info();
                info_Registro.Lst_det = new List <fa_registro_unidades_x_equipo_det_Info>();

                txtObservacion.Text = "";
                ucFa_Cliente_x_centro_costo_cmb1.Inicializar_Combos();
                ucCon_Periodo1.Inicializar_Combos();
                deFecha.EditValue = DateTime.Now;

                gridViewRegistros.Columns.Clear();
                gridControlEquiposAsignados.DataSource = null;
                gridControlRegistros.DataSource        = null;
            }
            catch (Exception ex)
            {
                string NameMetodo = System.Reflection.MethodBase.GetCurrentMethod().Name;
                MessageBox.Show(param.Get_Mensaje_sys(enum_Mensajes_sys.Error_comunicarse_con_sistemas) + ex.Message + " ", param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
                Log_Error_bus.Log_Error(NameMetodo + " - " + ex.ToString());
            }
        }
 public Boolean AnularDB(fa_registro_unidades_x_equipo_Info info)
 {
     try
     {
         using (Entity_Facturacion_FJ Context = new Entity_Facturacion_FJ())
         {
             fa_registro_unidades_x_equipo Entity = Context.fa_registro_unidades_x_equipo.FirstOrDefault(q => q.IdEmpresa == info.IdEmpresa && q.IdRegistro == info.IdRegistro);
             if (Entity != null)
             {
                 Entity.IdUsuarioUltAnu = info.IdUsuarioUltAnu;
                 Entity.Fecha_UltAnu    = info.Fecha_UltAnu;
                 Entity.MotiAnula       = info.MotiAnula;
                 Entity.nom_pc          = info.nom_pc;
                 Entity.ip            = info.ip;
                 Entity.Estado        = "I";
                 Entity.estado_cierre = true;
                 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 MensajeError);
         MensajeError = ex.ToString();
         throw new Exception(ex.ToString());
     }
 }
Exemple #3
0
        public Boolean ModificarDB(fa_registro_unidades_x_equipo_Info info)
        {
            try
            {
                info.IdEmpresa = param.IdEmpresa;
                info.ip        = param.ip;
                info.nom_pc    = param.nom_pc;

                info.IdUsuarioUltMod = param.IdUsuario;
                info.Fecha_UltMod    = param.Fecha_Transac;

                bool res = oData.ModificarDB(info);
                if (res)
                {
                    if (bus_Ini.EliminarDB(info))
                    {
                        res = bus_Ini.GuardarDB(info.Lst_det_x_Af_ini);
                    }
                }
                return(res);
            }
            catch (Exception ex)
            {
                string mensaje = "";
                mensaje = ex.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(), "", mensaje, "", "", "", "", "", DateTime.Now);
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                throw new Exception(mensaje);
            }
        }
Exemple #4
0
        public Boolean GuardarDB(fa_registro_unidades_x_equipo_Info info)
        {
            try
            {
                info.IdEmpresa = param.IdEmpresa;
                info.ip        = param.ip;
                info.nom_pc    = param.nom_pc;
                bool res = oData.GuardarDB(info);
                if (res)
                {
                    foreach (var item in info.Lst_det_x_Af_ini)
                    {
                        item.IdRegistro = info.IdRegistro;
                    }
                    res = bus_Ini.GuardarDB(info.Lst_det_x_Af_ini);
                }

                return(res);
            }
            catch (Exception ex)
            {
                string mensaje = "";
                mensaje = ex.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(), "", mensaje, "", "", "", "", "", DateTime.Now);
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                throw new Exception(mensaje);
            }
        }
Exemple #5
0
        void ucGe_Menu_Mantenimiento_x_usuario1_event_btnModificar_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                info_Registro = (fa_registro_unidades_x_equipo_Info)gridViewRegistro.GetFocusedRow();

                if (info_Registro == null)
                {
                    MessageBox.Show(param.Get_Mensaje_sys(enum_Mensajes_sys.Seleccione_un_registro), param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return;
                }
                if (info_Registro.IdPeriodo == 0)
                {
                    MessageBox.Show(param.Get_Mensaje_sys(enum_Mensajes_sys.Seleccione_un_registro), param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return;
                }
                if (info_Registro.Estado == "I")
                {
                    MessageBox.Show(param.Get_Mensaje_sys(enum_Mensajes_sys.El_registro_se_encuentra_anulado), param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return;
                }
                if (info_Registro.estado_cierre)
                {
                    MessageBox.Show("El registro se encuentra cerrado.", param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return;
                }
                Llamar_formulario(Cl_Enumeradores.eTipo_action.actualizar);
            }
            catch (Exception ex)
            {
                string NameMetodo = System.Reflection.MethodBase.GetCurrentMethod().Name;
                MessageBox.Show(param.Get_Mensaje_sys(enum_Mensajes_sys.Error_comunicarse_con_sistemas) + ex.Message + " ", param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
                Log_Error_bus.Log_Error(NameMetodo + " - " + ex.ToString());
            }
        }
Exemple #6
0
        public List <fa_registro_unidades_x_equipo_Info> Get_List_Vista(int idEmpresa, DateTime Fecha_Ini, DateTime Fecha_Fin)
        {
            try
            {
                List <fa_registro_unidades_x_equipo_Info> Lista = new List <fa_registro_unidades_x_equipo_Info>();

                using (Entity_Facturacion_FJ Context = new Entity_Facturacion_FJ())
                {
                    var lst = from q in Context.vwfa_registro_unidades_x_equipo
                              where idEmpresa == q.IdEmpresa &&
                              Fecha_Ini <= q.Fecha && q.Fecha <= Fecha_Fin
                              select q;

                    foreach (var item in lst)
                    {
                        fa_registro_unidades_x_equipo_Info info = new fa_registro_unidades_x_equipo_Info();
                        info.IdRegistro = item.IdRegistro;
                        info.IdEmpresa  = item.IdEmpresa;
                        info.IdPeriodo  = item.IdPeriodo;
                        info.Fecha      = item.Fecha;
                        info.IdCentroCosto_sub_centro_costo = item.IdCentroCosto_sub_centro_costo;
                        info.Observacion     = item.Observacion;
                        info.IdUsuarioUltMod = item.IdUsuarioUltMod;
                        info.Fecha_UltMod    = item.Fecha_UltMod;
                        info.IdUsuarioUltAnu = item.IdUsuarioUltAnu;
                        info.Fecha_UltAnu    = item.Fecha_UltAnu;
                        info.MotiAnula       = item.MotiAnula;
                        info.nom_pc          = item.nom_pc;
                        info.ip                     = item.ip;
                        info.IdCentroCosto          = item.IdCentroCosto;
                        info.nom_Centro_costo       = item.nom_Centro_costo;
                        info.nom_Cliente            = item.nom_Cliente;
                        info.smes                   = item.smes;
                        info.Estado                 = item.Estado;
                        info.pe_FechaIni            = item.pe_FechaIni == null ? DateTime.Now : (DateTime)item.pe_FechaIni;
                        info.pe_FechaFin            = item.pe_FechaFin == null ? DateTime.Now : (DateTime)item.pe_FechaFin;
                        info.IdEstadoRegistro_cat   = item.IdEstadoRegistro_cat;
                        info.nom_EstadoRegistro_cat = item.nom_EstadoRegistro_cat;
                        Lista.Add(info);
                    }
                }

                return(Lista);
            }
            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 MensajeError);
                MensajeError = ex.ToString();
                throw new Exception(ex.ToString());
            }
        }
Exemple #7
0
 public void Set_Info(fa_registro_unidades_x_equipo_Info info)
 {
     try
     {
         info_Registro = info;
     }
     catch (Exception ex)
     {
         string NameMetodo = System.Reflection.MethodBase.GetCurrentMethod().Name;
         MessageBox.Show(param.Get_Mensaje_sys(enum_Mensajes_sys.Error_comunicarse_con_sistemas) + ex.Message + " ", param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
         Log_Error_bus.Log_Error(NameMetodo + " - " + ex.ToString());
     }
 }
Exemple #8
0
 private void gridViewRegistro_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
 {
     try
     {
         info_Registro = (fa_registro_unidades_x_equipo_Info)gridViewRegistro.GetRow(e.FocusedRowHandle);
     }
     catch (Exception ex)
     {
         string NameMetodo = System.Reflection.MethodBase.GetCurrentMethod().Name;
         MessageBox.Show(param.Get_Mensaje_sys(enum_Mensajes_sys.Error_comunicarse_con_sistemas) + ex.Message + " ", param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
         Log_Error_bus.Log_Error(NameMetodo + " - " + ex.ToString());
     }
 }
 public Boolean EliminarDB(fa_registro_unidades_x_equipo_Info info)
 {
     try
     {
         return(oData.EliminarDB(info));
     }
     catch (Exception ex)
     {
         string mensaje = "";
         mensaje = ex.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(), "", mensaje, "", "", "", "", "", DateTime.Now);
         oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
         throw new Exception(mensaje);
     }
 }
        public List <fa_registro_unidades_x_equipo_Info> Get_List(int idEmpresa)
        {
            try
            {
                List <fa_registro_unidades_x_equipo_Info> Lista = new List <fa_registro_unidades_x_equipo_Info>();

                using (Entity_Facturacion_FJ Context = new Entity_Facturacion_FJ())
                {
                    var lst = from q in Context.fa_registro_unidades_x_equipo
                              where idEmpresa == q.IdEmpresa
                              select q;

                    foreach (var item in lst)
                    {
                        fa_registro_unidades_x_equipo_Info info = new fa_registro_unidades_x_equipo_Info();
                        info.IdEmpresa  = item.IdEmpresa;
                        info.IdRegistro = item.IdRegistro;
                        info.Fecha      = item.Fecha;
                        info.IdCentroCosto_sub_centro_costo = item.IdCentroCosto_sub_centro_costo;
                        info.Observacion     = item.Observacion;
                        info.IdUsuarioUltMod = item.IdUsuarioUltMod;
                        info.IdPeriodo       = item.IdPeriodo;
                        info.Fecha_UltMod    = item.Fecha_UltMod;
                        info.IdUsuarioUltAnu = item.IdUsuarioUltAnu;
                        info.Fecha_UltAnu    = item.Fecha_UltAnu;
                        info.MotiAnula       = item.MotiAnula;
                        info.nom_pc          = item.nom_pc;
                        info.ip            = item.ip;
                        info.IdCentroCosto = item.IdCentroCosto;
                        info.estado_cierre = item.estado_cierre;
                        info.Lst_det       = oData_det.Get_List_det(info);
                        Lista.Add(info);
                    }
                }

                return(Lista);
            }
            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 MensajeError);
                MensajeError = ex.ToString();
                throw new Exception(ex.ToString());
            }
        }
        public fa_registro_unidades_x_equipo_Info Get_Info(int idEmpresa, decimal IdRegistro)
        {
            try
            {
                fa_registro_unidades_x_equipo_Info info = new fa_registro_unidades_x_equipo_Info();

                using (Entity_Facturacion_FJ Context = new Entity_Facturacion_FJ())
                {
                    fa_registro_unidades_x_equipo Entity = Context.fa_registro_unidades_x_equipo.FirstOrDefault(q =>
                                                                                                                idEmpresa == q.IdEmpresa && IdRegistro == q.IdRegistro);

                    if (Entity != null)
                    {
                        info.IdEmpresa     = Entity.IdEmpresa;
                        info.IdRegistro    = Entity.IdRegistro;
                        info.IdPeriodo     = Entity.IdPeriodo;
                        info.Fecha         = Entity.Fecha;
                        info.IdCentroCosto = Entity.IdCentroCosto;
                        info.IdCentroCosto_sub_centro_costo = Entity.IdCentroCosto_sub_centro_costo;
                        info.IdPeriodo       = Entity.IdPeriodo;
                        info.Observacion     = Entity.Observacion;
                        info.IdUsuarioUltMod = Entity.IdUsuarioUltMod;
                        info.Fecha_UltMod    = Entity.Fecha_UltMod;
                        info.IdUsuarioUltAnu = Entity.IdUsuarioUltAnu;
                        info.Fecha_UltAnu    = Entity.Fecha_UltAnu;
                        info.MotiAnula       = Entity.MotiAnula;
                        info.nom_pc          = Entity.nom_pc;
                        info.ip            = Entity.ip;
                        info.Estado        = Entity.Estado;
                        info.estado_cierre = Entity.estado_cierre;
                        info.Estado        = Entity.Estado;
                        info.Lst_det       = oData_det.Get_List_det(info);
                    }
                }
                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 MensajeError);
                MensajeError = ex.ToString();
                throw new Exception(ex.ToString());
            }
        }
        public Boolean GuardarDB(fa_registro_unidades_x_equipo_Info info)
        {
            try
            {
                using (Entity_Facturacion_FJ Context = new Entity_Facturacion_FJ())
                {
                    fa_registro_unidades_x_equipo Entity = new fa_registro_unidades_x_equipo();

                    Entity.IdEmpresa  = info.IdEmpresa;
                    Entity.IdRegistro = info.IdRegistro = Get_Id(info.IdEmpresa);
                    Entity.IdPeriodo  = info.IdPeriodo;
                    Entity.Fecha      = info.Fecha;
                    Entity.IdCentroCosto_sub_centro_costo = info.IdCentroCosto_sub_centro_costo;
                    Entity.Observacion   = info.Observacion;
                    Entity.nom_pc        = info.nom_pc;
                    Entity.ip            = info.ip;
                    Entity.IdCentroCosto = info.IdCentroCosto;
                    Entity.Estado        = "A";
                    Entity.estado_cierre = info.estado_cierre;
                    Context.fa_registro_unidades_x_equipo.Add(Entity);
                    Context.SaveChanges();

                    if (info.Lst_det != null)
                    {
                        foreach (var item in info.Lst_det)
                        {
                            item.IdEmpresa       = info.IdEmpresa;
                            item.IdRegistro      = info.IdRegistro;
                            item.IdUnidad_Medida = " ";
                            item.IdTipo_Reg_cat  = " ";
                        }
                        oData_det.GuardarDB(info.Lst_det);
                    }
                }
                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 MensajeError);
                MensajeError = ex.ToString();
                throw new Exception(ex.ToString());
            }
        }
        public List <fa_registro_unidades_x_equipo_det_Info> Get_List_det(fa_registro_unidades_x_equipo_Info info)
        {
            try
            {
                List <fa_registro_unidades_x_equipo_det_Info> Lista = new List <fa_registro_unidades_x_equipo_det_Info>();

                using (Entity_Facturacion_FJ Context = new Entity_Facturacion_FJ())
                {
                    var lst = from q in Context.vwfa_registro_unidades_x_equipo_det
                              where info.IdEmpresa == q.IdEmpresa &&
                              info.IdRegistro == q.IdRegistro
                              select q;

                    foreach (var item in lst)
                    {
                        fa_registro_unidades_x_equipo_det_Info Info_det = new fa_registro_unidades_x_equipo_det_Info();

                        Info_det.IdEmpresa       = item.IdEmpresa;
                        Info_det.IdRegistro      = item.IdRegistro;
                        Info_det.IdFecha         = item.IdFecha;
                        Info_det.IdUnidad_Medida = item.IdUnidad_Medida;
                        Info_det.IdTipo_Reg_cat  = item.IdTipo_Reg_cat;
                        Info_det.IdActivoFijo    = item.IdActivoFijo;
                        Info_det.Valor           = item.Valor;
                        Info_det.fecha_reg       = item.fecha_reg;
                        Info_det.fecha_modi      = item.fecha_modi;
                        Info_det.IdPeriodo       = item.IdPeriodo;
                        Info_det.CodActivoFijo   = "[" + item.IdActivoFijo + "] " + item.CodActivoFijo;
                        Lista.Add(Info_det);
                    }
                }
                return(Lista);
            }
            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 MensajeError);
                MensajeError = ex.ToString();
                throw new Exception(ex.ToString());
            }
        }
        public Boolean ModificarDB(fa_registro_unidades_x_equipo_Info info)
        {
            try
            {
                using (Entity_Facturacion_FJ Context = new Entity_Facturacion_FJ())
                {
                    fa_registro_unidades_x_equipo Entity = Context.fa_registro_unidades_x_equipo.FirstOrDefault(q => q.IdEmpresa == info.IdEmpresa && q.IdRegistro == info.IdRegistro);
                    if (Entity != null)
                    {
                        Entity.Fecha       = info.Fecha;
                        Entity.Observacion = info.Observacion;

                        Entity.IdUsuarioUltMod = info.IdUsuarioUltMod;
                        Entity.Fecha_UltMod    = info.Fecha_UltMod;
                        Entity.nom_pc          = info.nom_pc;
                        Entity.ip            = info.ip;
                        Entity.estado_cierre = info.estado_cierre;
                        Context.SaveChanges();

                        foreach (var item in info.Lst_det)
                        {
                            item.IdEmpresa       = info.IdEmpresa;
                            item.IdRegistro      = info.IdRegistro;
                            item.IdUnidad_Medida = " ";
                            item.IdTipo_Reg_cat  = " ";
                            item.IdPeriodo       = info.IdPeriodo;
                        }
                        oData_det.EliminarDB(info);
                        oData_det.GuardarDB(info.Lst_det);
                    }
                }
                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 MensajeError);
                MensajeError = ex.ToString();
                throw new Exception(ex.ToString());
            }
        }
Exemple #15
0
        public Boolean AnularDB(fa_registro_unidades_x_equipo_Info info)
        {
            try
            {
                info.IdEmpresa = param.IdEmpresa;
                info.ip        = param.ip;
                info.nom_pc    = param.nom_pc;

                return(oData.AnularDB(info));
            }
            catch (Exception ex)
            {
                string mensaje = "";
                mensaje = ex.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(), "", mensaje, "", "", "", "", "", DateTime.Now);
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                throw new Exception(mensaje);
            }
        }
 public Boolean EliminarDB(fa_registro_unidades_x_equipo_Info info)
 {
     try
     {
         using (Entity_Facturacion_FJ Context = new Entity_Facturacion_FJ())//IdPeriodo IdRegistro
         {
             Context.Database.ExecuteSqlCommand("delete Fj_servindustrias.fa_registro_unidades_x_equipo_det where IdEmpresa = " + info.IdEmpresa + " and IdRegistro = " + info.IdRegistro);
             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 MensajeError);
         MensajeError = ex.ToString();
         throw new Exception(ex.ToString());
     }
 }
Exemple #17
0
 private void Set_Registro()
 {
     try
     {
         info_Registro = bus_Registros.Get_Info(info_Registro.IdEmpresa, info_Registro.IdRegistro);
         if (info_Registro != null)
         {
             txtIdRegistro.Text  = info_Registro.IdRegistro.ToString();
             txtObservacion.Text = info_Registro.Observacion;
             ucCon_Periodo1.Set_Periodo(info_Registro.IdPeriodo);
             deFecha.EditValue = info_Registro.Fecha;
             ucFa_Cliente_x_centro_costo_cmb1.Set_Info_Centro_costo(info_Registro.IdCentroCosto);
             ucFa_Cliente_x_centro_costo_cmb1.Set_Info_Centro_costo_sub_centro_costo(info_Registro.IdCentroCosto_sub_centro_costo);
             ucFa_CatalogosCmb1.set_CatalogosInfo(info_Registro.IdEstadoRegistro_cat);
         }
     }
     catch (Exception ex)
     {
         string NameMetodo = System.Reflection.MethodBase.GetCurrentMethod().Name;
         MessageBox.Show(param.Get_Mensaje_sys(enum_Mensajes_sys.Error_comunicarse_con_sistemas) + ex.Message + " ", param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
         Log_Error_bus.Log_Error(NameMetodo + " - " + ex.ToString());
     }
 }
 public List <fa_registro_unidades_x_equipo_det_ini_x_Af_Info> Get_List_Inicial_x_Af(fa_registro_unidades_x_equipo_Info info)
 {
     try
     {
         return(oData.Get_List_Inicial_x_Af(info));
     }
     catch (Exception ex)
     {
         string mensaje = "";
         mensaje = ex.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(), "", mensaje, "", "", "", "", "", DateTime.Now);
         oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
         throw new Exception(mensaje);
     }
 }
        public List <fa_registro_unidades_x_equipo_det_ini_x_Af_Info> Get_List_Inicial_x_Af(fa_registro_unidades_x_equipo_Info info)
        {
            try
            {
                List <fa_registro_unidades_x_equipo_det_ini_x_Af_Info> Lista = new List <fa_registro_unidades_x_equipo_det_ini_x_Af_Info>();

                using (Entity_Facturacion_FJ Context = new Entity_Facturacion_FJ())
                {
                    var lst = from q in Context.fa_registro_unidades_x_equipo_det_ini_x_Af
                              where q.IdEmpresa == info.IdEmpresa &&
                              q.IdRegistro == info.IdRegistro
                              select q;

                    foreach (var item in lst)
                    {
                        fa_registro_unidades_x_equipo_det_ini_x_Af_Info info_det = new fa_registro_unidades_x_equipo_det_ini_x_Af_Info();

                        info_det.IdEmpresa           = item.IdEmpresa;
                        info_det.IdActivoFijo        = item.IdActivoFijo;
                        info_det.IdRegistro          = item.IdRegistro;
                        info_det.IdUnidadFact_cat    = item.IdUnidadFact_cat;
                        info_det.Af_ValorUnidad_Actu = item.Af_ValorUnidad_Actu;
                        info_det.IdEmpresa_hn        = item.IdEmpresa_hn;
                        info_det.IdSucursal_hn       = item.IdSucursal_hn;
                        info_det.IdBodega_hn         = item.IdBodega_hn;
                        info_det.IdCbteVta_hn        = item.IdCbteVta_hn;

                        info_det.IdEmpresa_he  = item.IdEmpresa_he;
                        info_det.IdSucursal_he = item.IdSucursal_he;
                        info_det.IdBodega_he   = item.IdBodega_he;
                        info_det.IdCbteVta_he  = item.IdCbteVta_he;
                        Lista.Add(info_det);
                    }
                }

                return(Lista);
            }
            catch (Exception ex)
            {
                string MensajeError = "";
                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 MensajeError);
                MensajeError = ex.ToString();
                throw new Exception(ex.ToString());
            }
        }