Пример #1
0
        private void SaldosNI_FormClosing(object sender, FormClosingEventArgs e)
        {
            Clases.Logs log = new Clases.Logs(Usuario, this.AccessibleDescription, IDLog);
            log.Fin();

            e.Cancel = false;
        }
Пример #2
0
        private void frmDepositos_Load(object sender, EventArgs e)
        {
            this.Icon = ClasesSGUV.Propiedades.IconHalcoNET;

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

            DataTable tabla = new DataTable();

            tabla.Columns.Add("Cliente", typeof(string));
            tabla.Columns.Add("Nombre", typeof(string));
            tabla.Columns.Add("Referencia", typeof(string));
            tabla.Columns.Add("Monto", typeof(decimal));

            dataGridView1.DataSource = tabla;

            dataGridView1.Columns[3].ValueType = typeof(decimal);

            using (SqlConnection connection = new SqlConnection(ClasesSGUV.Propiedades.conectionSGUV))
            {
                using (SqlCommand command = new SqlCommand("select CardCode, CardName, ISNULL(U_RefPago, '') U_RefPago from [SBO-DistPJ].dbo.OCRD where CardType = 'C' AND frozenFor = 'N'", connection))
                {
                    command.CommandTimeout = 0;

                    SqlDataAdapter da = new SqlDataAdapter();
                    da.SelectCommand = command;

                    da.Fill(Datos);
                }
            }
        }
        public DetalleAntiguedadSaldos(string _cliente, string _nombre, string _usuario)
        {
            InitializeComponent();

            Cliente = _cliente;
            Nombre  = _nombre;
            Usuario = _usuario;
            log     = new Clases.Logs(Usuario, this.AccessibleDescription, 0);
        }
Пример #4
0
 public AntiguiedadSaldos(int rolUsuario, int codigoVendedor, string nombreUsuario, string sucursal)
 {
     InitializeComponent();
     Rol           = rolUsuario;
     CodVendedor   = codigoVendedor;
     NombreUsuario = nombreUsuario;
     Sucursal      = sucursal;
     log           = new Clases.Logs(NombreUsuario, this.AccessibleDescription, 0);
 }
Пример #5
0
        private void Atradius_Load(object sender, EventArgs e)
        {
            this.Icon = ClasesSGUV.Propiedades.IconHalcoNET;

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

            log = new Clases.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);
        }
Пример #6
0
        public Principal(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);
        }
Пример #7
0
 private void SaldosNI_Shown(object sender, EventArgs e)
 {
     try
     {
         Clases.Logs log = new Clases.Logs(Usuario, this.AccessibleDescription, 0);
         IDLog = log.Inicio();
     }
     catch (Exception)
     {
     }
 }
Пример #8
0
 private void Form1_Load(object sender, EventArgs e)
 {
     try
     {
         this.Icon = ClasesSGUV.Propiedades.IconHalcoNET;
         log       = new Clases.Logs(Usuario, this.AccessibleDescription, 0);
         cbTipoDocto.SelectedIndex = 0;
         // GetContador();
     }
     catch (Exception ex)
     {
         MessageBox.Show("Error inesperado: " + ex.Message, "HalcoNET", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
        private void FacturasPendientes_Load(object sender, EventArgs e)
        {
            try
            {
                this.Icon = ClasesSGUV.Propiedades.IconHalcoNET;

                this.CargarSucursales();
                btnConsultar_Click(sender, e);

                log = new Clases.Logs(Usuario, this.AccessibleDescription, 0);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error inesperado: " + ex.Message, "HalcoNET", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Пример #10
0
        private void ClientesAtradius_Load(object sender, EventArgs e)
        {
            try
            {
                this.Icon = ClasesSGUV.Propiedades.IconHalcoNET;

                using (SqlConnection connection = new SqlConnection(ClasesSGUV.Propiedades.conectionSGUV))
                {
                    using (SqlCommand command = new SqlCommand("PJ_Atradius", connection))
                    {
                        command.CommandType    = CommandType.StoredProcedure;
                        command.CommandTimeout = 0;
                        command.Parameters.AddWithValue("@TipoConsulta", 5);
                        command.Parameters.AddWithValue("@Desde", DateTime.Now);
                        command.Parameters.AddWithValue("@Hasta", DateTime.Now);
                        command.Parameters.AddWithValue("@CardCode", string.Empty);
                        command.Parameters.AddWithValue("@CardName", string.Empty);

                        DataTable      table = new DataTable();
                        SqlDataAdapter da    = new SqlDataAdapter();
                        da.SelectCommand = command;
                        da.Fill(table);

                        txtCliente.AutoCompleteCustomSource = Autocomplete(table, "CardCode");
                        txtCliente.AutoCompleteMode         = AutoCompleteMode.Suggest;
                        txtCliente.AutoCompleteSource       = AutoCompleteSource.CustomSource;

                        txtNombre.AutoCompleteCustomSource = Autocomplete(table, "CardName");
                        txtNombre.AutoCompleteMode         = AutoCompleteMode.Suggest;
                        txtNombre.AutoCompleteSource       = AutoCompleteSource.CustomSource;

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

                btnGuardar.Visible = false;

                DataTable filtros = new DataTable();
                filtros = Source(8, dateTimePicker1.Value);

                cbFiltro.DataSource    = filtros;
                cbFiltro.DisplayMember = "Nombre";
                cbFiltro.ValueMember   = "Codigo";

                log = new Clases.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error: " + ex.Message, "HalcoNET", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Пример #12
0
        private void ScocreCardGlobal_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.Month + 1, 1).AddDays(-1);

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

                dateTimePicker1.Value = fecha1;
                dateTimePicker2.Value = fecha2;
                if (Rol == (int)ClasesSGUV.Propiedades.RolesHalcoNET.Administrador || Rol == (int)ClasesSGUV.Propiedades.RolesHalcoNET.GerenteCobranza || Rol == (int)ClasesSGUV.Propiedades.RolesHalcoNET.GerenteFinanzas)
                {
                    //clbCobranza.Visible = true;
                    //label2.Visible = true;
                }
                else if (Rol == (int)ClasesSGUV.Propiedades.RolesHalcoNET.JefasCobranza)
                {
                    clbCobranza.Visible = false;
                    label2.Visible      = false;
                    lblSucursal.Visible = false;
                    clbSucursal.Visible = false;
                }

                CargarJefesCobranza();
                CargarSucursales();

                gridScore.DataSource = null;
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error inesperado. \r\n" + ex.Message, "Alerta", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Пример #13
0
        private void ScorecardSemanal_Load(object sender, EventArgs e)
        {
            try
            {
                this.Icon = ClasesSGUV.Propiedades.IconHalcoNET;
                log       = new Clases.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);
                DataTable JefasCobranza = CargarJefesCobranza();

                foreach (DataRow item in JefasCobranza.Rows)
                {
                    String     _jefa   = item.Field <String>("Nombre");
                    SqlCommand command = new SqlCommand("PJ_ScoreCardCobranza", new SqlConnection(ClasesSGUV.Propiedades.conectionSGUV));
                    command.CommandType = CommandType.StoredProcedure;
                    command.Parameters.AddWithValue("@TipoConsulta", 5);
                    command.Parameters.AddWithValue("@Sucursales", string.Empty);
                    command.Parameters.AddWithValue("@JefasCobranza", _jefa);
                    command.Parameters.AddWithValue("@FechaInicial", FechaInicial);
                    command.Parameters.AddWithValue("@FechaFinal", FechaFinal);
                    command.Parameters.AddWithValue("@Sucursal", NombreSucursal);
                    command.CommandTimeout = 0;

                    DataTable      table   = new DataTable();
                    SqlDataAdapter adapter = new SqlDataAdapter();
                    adapter.SelectCommand = command;
                    adapter.Fill(table);

                    this.Controls.Add(new DataGridView()
                    {
                        DataSource         = table,
                        BackgroundColor    = gridScore.BackgroundColor,
                        BorderStyle        = gridScore.BorderStyle,
                        CellBorderStyle    = gridScore.CellBorderStyle,
                        ReadOnly           = true,
                        AllowUserToAddRows = false,
                        Width = 550,
                        Name  = _jefa,
                        EnableHeadersVisualStyles     = false,
                        ColumnHeadersHeight           = 35,
                        ColumnHeadersDefaultCellStyle = gridScore.ColumnHeadersDefaultCellStyle
                    });

                    foreach (Control dg in this.Controls)
                    {
                        if (dg is DataGridView)
                        {
                            if (_jefa == dg.Name)
                            {
                                DataGridView dgv = dg as DataGridView;
                                dgv.Columns[0].HeaderText = _jefa;

                                dgv.Columns[0].Width = 100;
                                dgv.Columns[1].Width = 100;
                                dgv.Columns[2].Width = 100;
                                dgv.Columns[3].Width = 100;
                                dgv.Columns[4].Width = 100;

                                dgv.Columns[1].DefaultCellStyle.Format = "C0";
                                dgv.Columns[2].DefaultCellStyle.Format = "C0";
                                dgv.Columns[3].DefaultCellStyle.Format = "C0";
                                dgv.Columns[4].DefaultCellStyle.Format = "P0";

                                dgv.Columns[1].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
                                dgv.Columns[2].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
                                dgv.Columns[3].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
                                dgv.Columns[4].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
                            }
                        }
                    }
                }

                DataGridView anterior = null;
                int          cont     = 0;
                foreach (Control item in this.Controls)
                {
                    if (item is DataGridView && item.Visible == true)
                    {
                        if (anterior == null && item.Visible == true)
                        {
                            item.Location = new Point(9, 35);
                        }
                        else// if (cont < 2)
                        {
                            item.Location = new Point(9, 35 + ((10 + anterior.Height) * cont));
                        }

                        anterior = item as DataGridView;
                        cont++;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error: " + ex.Message, "HalcoNET", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }