Exemple #1
0
        private void LineaObjetivo_Load(object sender, EventArgs e)
        {
            try
            {
                this.Icon = ClasesSGUV.Propiedades.IconHalcoNET;
                log       = new Clases.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);
                Restricciones();

                CargarSucursales();
                CargarVendedores();
                CargarLinea();

                dateTimePicker1.Value = DateTime.Now;
                gridLineas.DataSource = null;
                gridLineas.Columns.Clear();
                gridTotales.DataSource = null;

                dateTimePicker1.Value = DateTime.Now;
                txtAvanceOptimo.Clear();
                txtDiasMes.Clear();
                txtDiasRestantes.Clear();
                txtDiasTranscurridos.Clear();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error: " + ex.Message, "HalcoNET", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #2
0
        private void FacturasContado_Load(object sender, EventArgs e)
        {
            this.Icon = ClasesSGUV.Propiedades.IconHalcoNET;

            log = new Clases.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);
            this.CargarJefesCobranza();
        }
Exemple #3
0
        public NuevoCompromiso(DataTable _dt, string _cliente, string _formato, string _tipo, string _usuario)
        {
            InitializeComponent();

            dtFecha.CustomFormat = _formato;
            Cliente       = _cliente;
            Tipo          = _tipo;
            dtFecha.Width = 257;
            Usuario       = _usuario;

            if (Tipo != "03")
            {
                dtFecha.Width = 126;
                Saldo         = Convert.ToDecimal(_dt.Compute("SUM([Saldo])", ""));

                var t = (from item in _dt.AsEnumerable()
                         select new
                {
                    Factura = item.Field <Int32>("Factura"),
                    Total = item.Field <decimal>("Importe Original"),
                    Pagos = item.Field <decimal>("Pagos aplicados"),
                    Saldo = item.Field <decimal>("Saldo")
                }).ToList();

                Facturas = Cobranza.ListConverter.ToDataTable(t);
                gridFacturas.DataSource = Facturas;
                log = new Clases.Logs(Usuario, this.AccessibleDescription, 0);
            }
        }
 public AlertasCompromisos(string jefa, string _title, string usuario)
 {
     InitializeComponent();
     Jefas         = jefa;
     lblTitle.Text = _title;
     Usuario       = usuario;
     log           = new Clases.Logs(Usuario, this.AccessibleDescription, 0);
 }
        private void Indicadores_Load(object sender, EventArgs e)
        {
            try
            {
                this.Icon = ClasesSGUV.Propiedades.IconHalcoNET;

                log = new Clases.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);

                Cursor = Cursors.WaitCursor;
                if (ClasesSGUV.Login.Rol != (int)ClasesSGUV.Propiedades.RolesHalcoNET.Zulma && ClasesSGUV.Login.Rol != (int)ClasesSGUV.Propiedades.RolesHalcoNET.Administrador)
                {
                    tabControl1.TabPages.Remove(tabConfig);
                }

                DATOS   = new DataTable();
                LIMITES = new DataTable();

                totalesCompras    = new DataTable();
                desabastoCompras  = new DataTable();
                stockoutCompras   = new DataTable();
                indicadorCompras1 = new DataTable();
                indicadorCompras2 = new DataTable();

                totalInventarios      = new DataTable();
                desabastoInventarios  = new DataTable();
                stockourInventarios   = new DataTable();
                indicadorInventarios1 = new DataTable();
                indicadorInventarios2 = new DataTable();



                bindingSource1 = new BindingSource();
                dataAdapter1   = new SqlDataAdapter();

                bindingSource2 = new BindingSource();
                dataAdapter2   = new SqlDataAdapter();

                indicadorCompras1 = this.CrearTablas(indicadorCompras1);
                indicadorCompras2 = this.CrearTablas(indicadorCompras2);

                indicadorInventarios1 = this.CrearTablas(indicadorInventarios1);
                indicadorInventarios2 = this.CrearTablas(indicadorInventarios2);

                toolStripStatusLabel1.Text = "Espere un momento: Cargando información.";

                //if (ClasesSGUV.Login.Rol == (int)ClasesSGUV.Propiedades.RolesHalcoNET.Zulma || ClasesSGUV.Login.Rol == (int)ClasesSGUV.Propiedades.RolesHalcoNET.Administrador)
                workerLimites.RunWorkerAsync();
                this.DatosVI();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error inesperado: " + ex.Message, "HalcoNET", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {
                Cursor = Cursors.Default;
            }
        }
Exemple #6
0
 public SeguimientoCompromisos(string _sucursal, int _rol, string _jefa, string _usuario)
 {
     JefaCobranza = _jefa;
     Rol          = _rol;
     Sucursal     = _sucursal;
     Usuario      = _usuario;
     InitializeComponent();
     log = new Clases.Logs(Usuario, this.AccessibleDescription, 0);
 }
Exemple #7
0
        public DetalleNCPendientes(string _sucursal, string _jefa, DateTime _fecha, string Usuario)
        {
            InitializeComponent();

            Sucursal = _sucursal;
            Jefa     = _jefa;
            Fecha    = _fecha;
            log      = new Clases.Logs(Usuario, this.AccessibleDescription, 0);
        }
 public CoberturaCartera(string _sucursal, string _usuario, int _rol, string _jefa)
 {
     InitializeComponent();
     Sucursal     = this.GetSucursalName(_sucursal);
     Rol          = _rol;
     Usuario      = _usuario;
     JefaCobranza = _jefa;
     log          = new Clases.Logs(Usuario, this.AccessibleDescription, 0);
 }
        private void Garantias_Load(object sender, EventArgs e)
        {
            this.Icon = ClasesSGUV.Propiedades.IconHalcoNET;
            DataGridView dgv = dgvItems;

            dgv.BorderStyle = BorderStyle.FixedSingle;

            log = new Clases.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);
        }
        private void VentaCaida_Load(object sender, EventArgs e)
        {
            this.Icon = ClasesSGUV.Propiedades.IconHalcoNET;

            cbCanal.SelectedIndex = 0;
            log = new Clases.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);
            this.CargarSucursales();
            this.CargarVendedores();
            this.GetlLineas(4, 0, 0);
        }
        public AuditoriaRecibos(string _sucursal, string _jefa, int _rol, string _usuario)
        {
            InitializeComponent();

            Sucursal     = _sucursal;
            JefaCobranza = _jefa;
            Rol          = _rol;
            Usuario      = _usuario;
            log          = new Clases.Logs(Usuario, this.AccessibleDescription, 0);
        }
 private void frmScoreCardProgsHalcon_Load(object sender, EventArgs e)
 {
     try
     {
         this.Icon = ClasesSGUV.Propiedades.IconHalcoNET;
         log       = new Clases.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);
     }
     catch (Exception)
     {
     }
 }
        private void frmScoreRegionales_Load(object sender, EventArgs e)
        {
            this.Icon = ClasesSGUV.Propiedades.IconHalcoNET;
            cargarUsuarios();
            if (this.usuario == "N")
            {
                cmbUsuario.SelectedValue = this.usuario;
                cmbUsuario.Enabled       = false;
            }

            log = new Clases.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);
        }
 private void IdentificacionMovimientos_Load(object sender, EventArgs e)
 {
     try
     {
         this.Icon = ClasesSGUV.Propiedades.IconHalcoNET;
         log       = new Clases.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);
         this.CargarCtasBancos();
     }
     catch (Exception)
     {
     }
 }
 private void Garantias_Cobranza_Load(object sender, EventArgs e)
 {
     try
     {
         this.Icon = ClasesSGUV.Propiedades.IconHalcoNET;
         log       = new Clases.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);
     }
     catch (Exception ex)
     {
         MessageBox.Show("Error inesperado: " + ex.Message, "HalcoNET", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemple #16
0
 public void TempletePagos_Load(object sender, EventArgs e)
 {
     try
     {
         this.Icon        = ClasesSGUV.Propiedades.IconHalcoNET;
         progressBar.Step = 1;
         log = new Clases.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);
     }
     catch (Exception ex)
     {
         MessageBox.Show("Error inesperado: " + ex.Message, "HalcoNET", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemple #17
0
        private void Transferencias_Compras_Load(object sender, EventArgs e)
        {
            this.Icon = ClasesSGUV.Propiedades.IconHalcoNET;

            this.ListaArticulos();

            txtArticulo.AutoCompleteCustomSource = Autocomplete(Articul, "ItemCode");
            txtArticulo.AutoCompleteMode         = AutoCompleteMode.Suggest;
            txtArticulo.AutoCompleteSource       = AutoCompleteSource.CustomSource;

            log = new Clases.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);
            CargarLinea(cbLinea, "");

            CargarProveedores(cbProveedor, "");
        }
Exemple #18
0
        public InidicadoresMnsuales(string _jefa, string _sucursal, int _rol, string _usuario)
        {
            Sucursal     = this.GetSucursalName(_sucursal);
            JefaCobranza = _jefa;
            Rol          = _rol;
            Usuario      = _usuario;
            InitializeComponent();

            Color ForeCoror = btnCompromisos.ForeColor;
            Color BackColor = btnCompromisos.BackColor;

            h = new Thread(new ThreadStart(Hilo));

            log = new Clases.Logs(Usuario, this.AccessibleDescription, 0);
        }
        private void CargarMovimientos_Load(object sender, EventArgs e)
        {
            this.Icon = ClasesSGUV.Propiedades.IconHalcoNET;

            log = new Clases.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);
            this.MaximizeBox    = false;
            pictureBox1.Visible = false;
            toolProgress.Step   = 1;
            try
            {
                this.CargarCtasBancos();
            }
            catch (Exception)
            {
            }
        }
        private void Garantias_Compras_Load(object sender, EventArgs e)
        {
            try
            {
                this.Icon      = ClasesSGUV.Propiedades.IconHalcoNET;
                dtInicio.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
                this.Sucursales();
                this.Vendedores();

                log = new Clases.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error inesperado: " + ex.Message, "HalcoNET", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #21
0
        private void KPS_Load(object sender, EventArgs e)
        {
            try
            {
                this.Icon = ClasesSGUV.Propiedades.IconHalcoNET;
                log       = new Clases.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);

                CheckForIllegalCrossThreadCalls = false;
                indicadores = new Thread(getIndicadores);
                CargarSucursales();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error: " + ex.Message, "Halconet", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #22
0
        private void VentaEfectiva_Load(object sender, EventArgs e)
        {
            try
            {
                this.Icon = ClasesSGUV.Propiedades.IconHalcoNET;

                this.CargarVendedores();
                this.CargarSucursales();

                log = new Clases.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error: " + ex.Message, "HalcoNET", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #23
0
        private void Reporte_Load(object sender, EventArgs e)
        {
            this.Icon = ClasesSGUV.Propiedades.IconHalcoNET;
            //this.MaximizeBox = false;
            log = new Clases.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);
            this.Restricciones();

            txtProducto.Clear();
            txtCliente.Clear();
            dtpFechaFinal.Value   = DateTime.Now;
            dtpFechaInicial.Value = DateTime.Now;

            gridDetalles.DataSource = null;
            gridReporte.DataSource  = null;

            //cbFiltarEjes.Visible = ClasesSGUV.Login.Rol == 1 || ClasesSGUV.Login.Rol == 2;
        }
Exemple #24
0
        private void InidicadoresMnsuales_Load(object sender, EventArgs e)
        {
            try
            {
                this.Icon = ClasesSGUV.Propiedades.IconHalcoNET;
                DateTime fechatemp = DateTime.Today;
                DateTime fecha1    = new DateTime(fechatemp.Year, fechatemp.Month, 1);
                DateTime fecha2    = new DateTime(fechatemp.Year, fechatemp.AddMonths(1).Month, 1).AddDays(-1);

                Fecha = fecha1;

                btnDetalle.Enabled     = false;
                btnAlertasPR.Enabled   = false;
                btnCompromisos.Enabled = false;

                dtInicial.Value = fecha1;
                dtFinal.Value   = fecha2;

                this.CargarJefesCobranza();
                this.CargarMeses();

                txtAño.Text          = DateTime.Now.Year.ToString();
                cmbMes.SelectedIndex = DateTime.Now.Month - 1;

                if (!string.IsNullOrEmpty(JefaCobranza))
                {
                    this.GetIndicadores(JefaCobranza, fecha1, DateTime.Now, Sucursal);
                }

                if (Rol == (int)ClasesSGUV.Propiedades.RolesHalcoNET.JefasCobranza)
                {
                    lblVendedor.Visible = false;
                    cbCobranza.Visible  = false;
                }

                log = new Clases.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error inesperado: " + ex.InnerException.Message, "HalcoNET", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #25
0
        private void Transferencias_Load(object sender, EventArgs e)
        {
            try
            {
                this.Icon = ClasesSGUV.Propiedades.IconHalcoNET;

                //CargarLinea(cbLinea, "");

                //CargarProveedores(cbProveedor, "");

                CargarLinea(clbLinea, "Todas");

                CargarProveedores(clbProveedor, "Todos");

                log = new Clases.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error inesperado: " + ex.Message, "HalcoNET", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void UtilidadLineas_Load(object sender, EventArgs e)
        {
            this.Icon        = ClasesSGUV.Propiedades.IconHalcoNET;
            log              = new Clases.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);
            this.MaximizeBox = true;
            try
            {
                Restricciones();
                CargarVendedores();
                CargarLinea();
                CargarSucursales();
                CargarGranCanales();
                int act   = DateTime.Now.Month;
                int ant_i = DateTime.Now.AddMonths(-3).Month;
                int ant_f = DateTime.Now.AddMonths(-1).Month;
                DateTimeFormatInfo fecha = CultureInfo.CurrentCulture.DateTimeFormat;

                string actual   = fecha.GetMonthName(DateTime.Now.Month);
                string atrasado = fecha.GetMonthName(ant_i) + "-" + fecha.GetMonthName(ant_f);

                lblVenta.Text    += " " + actual;
                lblUtilidad.Text += " " + actual;

                txtCliente.Clear();
                txtArticulo.Clear();
                txtCliente.Focus();
                txtVenta.Clear();
                txtUtilidadEstimada.Clear();

                gridLineas.DataSource    = null;
                gridArticulos.DataSource = null;

                //clbSucursal.SelectedIndex = 0;
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error inesperado: " + ex.Message, "HalcoNET", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #27
0
        private void AnalisisVenta_Load(object sender, EventArgs e)
        {
            try
            {
                this.Icon = ClasesSGUV.Propiedades.IconHalcoNET;

                //this.CargarVendedores();
                //this.CargarSucursales();
                this.CargarLinea();

                log = new Clases.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);


                using (SqlConnection connection = new SqlConnection(ClasesSGUV.Propiedades.conectionPJ))
                {
                    using (SqlCommand command = new SqlCommand("PJ_CalculoUtilidad", connection))
                    {
                        command.CommandType = CommandType.StoredProcedure;
                        command.Parameters.AddWithValue("@TipoConsulta", 4);
                        command.Parameters.AddWithValue("@Articulo", string.Empty);
                        SqlParameter PrecCompra = new SqlParameter("@PrecioCompra", 0.0);
                        PrecCompra.Direction = ParameterDirection.Output;
                        command.Parameters.Add(PrecCompra);

                        SqlDataAdapter da = new SqlDataAdapter();
                        da.SelectCommand = command;
                        da.Fill(Articulos);
                    }
                }
                textBox1.AutoCompleteCustomSource = frmCalculoUtilidad.Autocomplete(Articulos, "ItemCode");
                textBox1.AutoCompleteMode         = AutoCompleteMode.SuggestAppend;
                textBox1.AutoCompleteSource       = AutoCompleteSource.CustomSource;
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error: " + ex.Message, "HalcoNET", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void frmSolicitudProducto_Load(object sender, EventArgs e)
        {
            try
            {
                this.Icon = ClasesSGUV.Propiedades.IconHalcoNET;

                this.Fill(1, cbVendedor, "Vendedores");
                this.Fill(4, cbUnidadVenta, "Sucursales");
                this.Fill(2, new ComboBox(), "Clientes");
                this.Fill(6, new ComboBox(), "Articulos");
                this.Fill(3, new ComboBox(), "Lineas");
                this.Fill(5, new ComboBox(), "Provedores");

                txtCliente.AutoCompleteCustomSource = Autocomplete(data1.Tables["Clientes"], "Codigo");
                txtCliente.AutoCompleteMode         = AutoCompleteMode.Suggest;
                txtCliente.AutoCompleteSource       = AutoCompleteSource.CustomSource;

                if (ClasesSGUV.Login.Vendedor1 > 0)
                {
                    cbVendedor.SelectedValue = ClasesSGUV.Login.Vendedor1;
                    cbVendedor_SelectionChangeCommitted(sender, e);

                    cbVendedor.Enabled    = false;
                    cbUnidadVenta.Enabled = false;
                }

                dgvItems.DataSource = tblDetalle;

                this.Formato(dgvItems, true, false, false);

                log = new Clases.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);
            }
            catch (Exception)
            {
            }
        }
Exemple #29
0
 private void Atradius_Load(object sender, EventArgs e)
 {
     this.Icon     = ClasesSGUV.Propiedades.IconHalcoNET;
     dtDesde.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
     log           = new Clases.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);
 }
Exemple #30
0
        private void CalculoUtilidad_Load(object sender, EventArgs e)
        {
            try
            {
                this.Icon = ClasesSGUV.Propiedades.IconHalcoNET;

                comboBox1.Text = string.Empty;
                log            = new Clases.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);

                using (SqlConnection connection = new SqlConnection(ClasesSGUV.Propiedades.conectionPJ))
                {
                    using (SqlCommand command = new SqlCommand("PJ_CalculoUtilidad", connection))
                    {
                        command.CommandType = CommandType.StoredProcedure;
                        command.Parameters.AddWithValue("@TipoConsulta", (int)TipoConsulta.Articulos);
                        command.Parameters.AddWithValue("@Articulo", string.Empty);
                        SqlParameter PrecCompra = new SqlParameter("@PrecioCompra", 0.0);
                        PrecCompra.Direction = ParameterDirection.Output;
                        command.Parameters.Add(PrecCompra);

                        SqlDataAdapter da = new SqlDataAdapter();
                        da.SelectCommand = command;
                        da.Fill(Articulos);
                    }
                }

                txtArticulo.AutoCompleteCustomSource = Autocomplete(Articulos, "ItemCode");
                txtArticulo.AutoCompleteMode         = AutoCompleteMode.SuggestAppend;
                txtArticulo.AutoCompleteSource       = AutoCompleteSource.CustomSource;

                comboBox1.DataSource    = Articulos;
                comboBox1.DisplayMember = "Dscription";
                comboBox1.ValueMember   = "ItemCode";
                //txtArticulo.AutoCompleteMode = AutoCompleteMode.

                txtDscription.AutoCompleteCustomSource = Autocomplete(Articulos, "Dscription");
                txtDscription.AutoCompleteMode         = AutoCompleteMode.SuggestAppend;
                txtDscription.AutoCompleteSource       = AutoCompleteSource.CustomSource;

                using (SqlConnection connection = new SqlConnection(ClasesSGUV.Propiedades.conectionPJ))
                {
                    using (SqlCommand command = new SqlCommand("PJ_CalculoUtilidad", connection))
                    {
                        command.CommandType = CommandType.StoredProcedure;
                        command.Parameters.AddWithValue("@TipoConsulta", (int)TipoConsulta.TC);
                        command.Parameters.AddWithValue("@Articulo", string.Empty);
                        SqlParameter PrecCompra = new SqlParameter("@PrecioCompra", 0.0);
                        PrecCompra.Direction = ParameterDirection.Output;
                        command.Parameters.Add(PrecCompra);
                        PrecCompra.DbType = DbType.Decimal;
                        PrecCompra.Scale  = 6;

                        connection.Open();
                        command.ExecuteNonQuery();
                        PrecioCompra = Convert.ToDecimal(command.Parameters["@PrecioCompra"].Value.ToString());

                        lblTC.Text = "TC: " + PrecioCompra.ToString("C2");
                    }
                }

                txtArticulo.Focus();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error inesperado: " + ex.Message, "HalcoNET", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }