Example #1
0
        public void set_empresa(tb_Empresa_Info iEmpre)
        {
            try
            {
                this.txt_Contador.Text         = iEmpre.em_contador;
                this.txt_RucContador.Text      = iEmpre.em_rucContador;
                this.txt_fax.Text              = iEmpre.em_fax;
                this.txt_Gerente.Text          = iEmpre.em_gerente;
                this.txt_NomEmpresa.Text       = iEmpre.em_nombre;
                this.txt_RucEmpresa.EditValue  = iEmpre.em_ruc;
                this.txt_telefono.Text         = iEmpre.em_telefonos;
                this.txt_telInternacional.Text = iEmpre.em_tel_int;
                this.dtpFechaInicioConta.Value = iEmpre.em_fechaInicioContable;
                this.lblIdEmpresa.Text         = iEmpre.IdEmpresa.ToString();
                this.dtpFechaInicioConta.Value = iEmpre.em_fechaInicioContable;
                this.txt_Direccion.Text        = iEmpre.em_direccion;
                this.chkActivo.Checked         = (iEmpre.Estado == "A") ? true : false;
                this.txtcodigo.Text            = iEmpre.codigo;
                this.txt_cod_dinardap.Text     = iEmpre.cod_entidad_dinardap;
                txtEmail.EditValue             = iEmpre.em_Email;


                if (iEmpre.em_logo != null)
                {
                    MemoryStream ms = new MemoryStream(iEmpre.em_logo);
                    pic_logo.Image = System.Drawing.Bitmap.FromStream(ms);
                }

                tb_Empresa_Bus BusEmpresa = new tb_Empresa_Bus();

                byte [] fondo_ = BusEmpresa.Get_Fondo_Pantalla_x_Empresa(iEmpre.IdEmpresa);

                iEmpre.em_fondo = fondo_;


                if (iEmpre.em_fondo != null)
                {
                    MemoryStream ps = new MemoryStream(iEmpre.em_fondo);
                    pic_fondo.Image = System.Drawing.Bitmap.FromStream(ps);
                }

                chkllevaCont.Checked      = (iEmpre.ObligadoAllevarConta == "SI") ? true : false;
                txtRazon.EditValue        = iEmpre.RazonSocial;
                txtNomComercial.EditValue = iEmpre.NombreComercial;
                txtResContEsp.EditValue   = iEmpre.ContribuyenteEspecial;


                _empresa_info = iEmpre;
            }
            catch (Exception ex)
            {
                Log_Error_bus.Log_Error(ex.ToString());
                MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Example #2
0
        private bool ValidarIngreso()
        {
            try
            {
                FrmSeg_Login login = new FrmSeg_Login();
                login.ShowDialog(this);

                if (param.IdUsuario == null)
                {
                    Application.Exit();
                    return(false);
                }

                FrmSeg_Login_x_Empresas frm_login_x_empresas = new FrmSeg_Login_x_Empresas();
                frm_login_x_empresas.ShowDialog(this);
                InfoEmpresa = param.InfoEmpresa;
                InfoUsuario = param.InfoUsuario;

                tb_Empresa_Bus BusEmpresa = new tb_Empresa_Bus();

                byte[] fondo = BusEmpresa.Get_Fondo_Pantalla_x_Empresa(param.InfoEmpresa.IdEmpresa);

                if (fondo != null)
                {
                    this.BackgroundImage       = Funciones.ArrayAImage(fondo);
                    this.BackgroundImageLayout = ImageLayout.Stretch;
                }

                bei_logo.EditValue = InfoEmpresa.em_logo;

                switch (param.IdCliente_Ven_x_Default)
                {
                case Cl_Enumeradores.eCliente_Vzen.FJ:
                    blcApariencia.Visibility = BarItemVisibility.Never;
                    break;

                default:
                    blcApariencia.Visibility = BarItemVisibility.Always;
                    break;
                }

                return(true);
            }
            catch (Exception ex)
            {
                string NameMetodo = System.Reflection.MethodBase.GetCurrentMethod().Name;
                NameMetodo = NameMetodo + " - " + ex.ToString();
                MessageBox.Show(NameMetodo + " " + param.Get_Mensaje_sys(enum_Mensajes_sys.Error_comunicarse_con_sistemas)
                                , param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
                Log_Error_bus.Log_Error(NameMetodo + " - " + ex.ToString());
                return(false);
            }
        }
Example #3
0
        private bool ValidarIngreso()
        {
            try
            {
                FrmSeg_Login login = new FrmSeg_Login();
                login.ShowDialog(this);



                if (param.IdUsuario == null)
                {
                    Application.Exit();
                    return(false);
                }

                FrmSeg_Login_x_Empresas frm_login_x_empresas = new FrmSeg_Login_x_Empresas();
                frm_login_x_empresas.ShowDialog(this);
                InfoEmpresa = param.InfoEmpresa;
                InfoUsuario = param.InfoUsuario;

                tb_Empresa_Bus BusEmpresa = new tb_Empresa_Bus();

                byte[] fondo = BusEmpresa.Get_Fondo_Pantalla_x_Empresa(param.InfoEmpresa.IdEmpresa);

                if (fondo != null)
                {
                    this.BackgroundImage = Funciones.ArrayAImage(fondo);
                }

                if (InfoEmpresa.em_nombre.Equals("DESARROLLO") || InfoEmpresa.em_nombre.Equals("DESarrollo") || InfoEmpresa.em_nombre.Equals("desARROllo") || InfoEmpresa.em_nombre.Equals("desarroLLO"))
                {
                    LBLMENSAJE.Visible = true;
                }
                return(true);
            }
            catch (Exception ex)
            {
                string NameMetodo = System.Reflection.MethodBase.GetCurrentMethod().Name;
                NameMetodo = NameMetodo + " - " + ex.ToString();
                MessageBox.Show(NameMetodo + " " + param.Get_Mensaje_sys(enum_Mensajes_sys.Error_comunicarse_con_sistemas)
                                , param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
                Log_Error_bus.Log_Error(NameMetodo + " - " + ex.ToString());
                return(false);
            }
        }