Esempio n. 1
0
        private void EntradasMercancia_Load(object sender, EventArgs e)
        {
            try
            {
                this.Icon = ClasesSGUV.Propiedades.IconHalcoNET;

                log = new ClasesSGUV.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);
                DataSet       data = new DataSet();
                BindingSource masterBindingSource  = new BindingSource();
                BindingSource detailsBindingSource = new BindingSource();

                data.Tables.Add(Encabezado());
                data.Tables.Add(Detalle());

                DataRelation relation = new DataRelation("RelacionDetalle", data.Tables["Encabezado"].Columns["Núm EM"], data.Tables["Detalle"].Columns["DocNum"]);

                data.Relations.Add(relation);
                masterBindingSource.DataSource  = data;
                masterBindingSource.DataMember  = "Encabezado";
                detailsBindingSource.DataSource = masterBindingSource;
                detailsBindingSource.DataMember = "RelacionDetalle";
                dataGridView1.DataSource        = masterBindingSource;
                dataGridView2.DataSource        = detailsBindingSource;

                FormatoGridEncabezado();
                FormatoGridDetalle();
            }
            catch (Exception ex)
            { MessageBox.Show(ex.Message); }
        }
Esempio n. 2
0
        private void frm_AlternativeItems_Load(object sender, EventArgs e)
        {
            Log = new ClasesSGUV.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);

            actualizarToolStripButton.Click -= new EventHandler(btnActualizar_Click);
            actualizarToolStripButton.Click += new EventHandler(btnActualizar_Click);
        }
Esempio n. 3
0
        private void FrmAltaActualizacionCoordenadas_Load(object sender, EventArgs e)
        {
            try
            {
                //Se consultan todos los clientes
                using (SqlConnection connection = new SqlConnection(ClasesSGUV.Propiedades.conectionLog))
                {
                    using (SqlCommand command = new SqlCommand("up_RutasADM", connection))
                    {
                        command.CommandType = CommandType.StoredProcedure;

                        command.Parameters.AddWithValue("@TipoConsulta", 35);
                        command.Parameters.AddWithValue("@Sucursal", ClasesSGUV.Login.Sucursal);
                        command.CommandTimeout = 0;

                        DataTable dtClientes = new DataTable();

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

                        cboClienteCoordenadas.DataSource    = dtClientes.Copy();
                        cboClienteCoordenadas.ValueMember   = "Codigo";
                        cboClienteCoordenadas.DisplayMember = "Nombre";
                        cboClienteCoordenadas.ActiveRow     = null;
                    }
                }

                log = new ClasesSGUV.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
        }
Esempio n. 4
0
        private void frmAuditoriaStocks_Load(object sender, EventArgs e)
        {
            Log = new ClasesSGUV.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);
            ClasesSGUV.Form.ControlsForms.setDataSource(clbAlmacenes, ClasesSGUV.DataSource.GetSource((int)ClasesSGUV.DataSource.TipoQry.AlmacenesTodos, string.Empty, string.Empty), "WhsName", "WhsCode", "--Todos--");
            ClasesSGUV.Form.ControlsForms.setDataSource(clbLineas, ClasesSGUV.DataSource.GetSource((int)ClasesSGUV.DataSource.TipoQry.LineasTodas, string.Empty, string.Empty), "ItmsGrpNam", "ItmsGrpCod", "--Todas--");

            clbLineas.Click -= new EventHandler(ClasesSGUV.Form.ControlsForms.clbBox_Click);
            clbLineas.Click += new EventHandler(ClasesSGUV.Form.ControlsForms.clbBox_Click);

            clbAlmacenes.Click -= new EventHandler(ClasesSGUV.Form.ControlsForms.clbBox_Click);
            clbAlmacenes.Click += new EventHandler(ClasesSGUV.Form.ControlsForms.clbBox_Click);


            DataTable tbl_Articulos = ClasesSGUV.DataSource.GetSource((int)ClasesSGUV.DataSource.TipoQry.GetArticulos, string.Empty, string.Empty);

            ClasesSGUV.Form.ControlsForms.Autocomplete(txtItemCode, tbl_Articulos.Copy(), "ItemCode");
            this.dgvDatos.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.Copy, true, true);

            nuevoToolStripButton.Enabled      = false;
            guardarToolStripButton.Enabled    = false;
            actualizarToolStripButton.Enabled = false;
            imprimirToolStripButton.Enabled   = true;

            imprimirToolStripButton.Click -= new EventHandler(btnPrint_Click);
            imprimirToolStripButton.Click += new EventHandler(btnPrint_Click);
        }
Esempio n. 5
0
        private void frmIndicadores_Load(object sender, EventArgs e)
        {
            try
            {
                this.Log = new ClasesSGUV.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);

                if (ClasesSGUV.Login.Rol == (int)ClasesSGUV.Propiedades.RolesHalcoNET.Administrador)
                {
                    pictureBox1.Image = Properties.Resources.small_load;
                }

                nuevoToolStripButton.Enabled    = false;
                guardarToolStripButton.Enabled  = false;
                exportarToolStripButton.Enabled = false;
                ayudaToolStripButton.Enabled    = false;

                Log = new ClasesSGUV.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);
                dgvPendientes.DataSource = null;
                ClasesSGUV.Form.ControlsForms.setDataSource(cbCompradores, ClasesSGUV.DataSource.GetSource((int)ClasesSGUV.DataSource.TipoQry.PlaneadoresCompra, null, string.Empty), "U_VLGX_PLC", "U_VLGX_PLC", "Todos");

                PathHelp = "http://hntsolutions.net/manual/module_14_4.htm?ms=AAAAAAA%3D&st=MA%3D%3D&sct=NDY1MQ%3D%3D&mw=MjU1";
            }
            catch (Exception)
            {
            }
        }
Esempio n. 6
0
        private void FrmConsultaFacturas_Load(object sender, EventArgs e)
        {
            log = new ClasesSGUV.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);

            GridKeyActionMapping mapping = new GridKeyActionMapping(Keys.Enter, UltraGridAction.BelowCell, (UltraGridState)0, UltraGridState.InEdit, SpecialKeys.All, (SpecialKeys)0);

            this.ugvDatos.KeyActionMappings.Add(mapping);

            dtpInicio.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 01, 00, 00, 00);
            dtpFin.Value    = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 59, 59);

            int Permiso = H_Compras.Logistica.csLogistica.ConsultaTipoPermisosProceso(13);

            if (RolOperador.Gerentes == (RolOperador)Permiso)
            {
                oTipoOperador = RolOperador.Gerentes;
                this.Text     = "Modificación/Autorización de Solicitudes - Logistica";
            }
            else if (RolOperador.AdministradorTotal == (RolOperador)Permiso)
            {
                oTipoOperador = RolOperador.AdministradorTotal;
                this.Text     = "Modificación/Autorización de Solicitudes - Logistica";
            }
            else if (RolOperador.RepartoRastreo == (RolOperador)Permiso)
            {
                oTipoOperador = RolOperador.RepartoRastreo;
                this.Text     = "Actualización de Solicitudes - Logistica";
            }
            else
            {
                oTipoOperador = RolOperador.Vendedor;
                this.Text     = "Consulta de Solicitudes - Logistica";
            }
        }
Esempio n. 7
0
        private void FrmEstacionalidadTransferencias_Load(object sender, EventArgs e)
        {
            try
            {
                DataTable tbl_AlmacenesTemp = ClasesSGUV.DataSource.GetSource((int)ClasesSGUV.DataSource.TipoQry.AlmacenesVenta, string.Empty, string.Empty);
                DataTable tbl_Almacenes     = new DataTable();
                tbl_Almacenes = (from obj in tbl_AlmacenesTemp.AsEnumerable()
                                 where obj.Field <string>("Whscode") != "26" && obj.Field <string>("Whscode") != "T 197"
                                 select obj
                                 ).CopyToDataTable();

                cboAlmacen.DataSource    = tbl_Almacenes;
                cboAlmacen.DisplayMember = "WhsName";
                cboAlmacen.ValueMember   = "Whscode";
                cboAlmacen.SelectedIndex = 0;

                buscarStripButton.Enabled       = true;
                nuevoToolStripButton.Visible    = false;
                imprimirToolStripButton.Visible = false;
                guardarToolStripButton.Visible  = false;

                buscarStripButton.Click       += btnConsultar_Click;
                exportarToolStripButton.Click += btnExportar_Click;

                log = new ClasesSGUV.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
        }
Esempio n. 8
0
        private void SeguimientoCompras_Load(object sender, EventArgs e)
        {
            this.Icon = ClasesSGUV.Propiedades.IconHalcoNET;

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

            this.ListaArticulos();

            txtArticulo.AutoCompleteCustomSource = Autocomplete(Articul, "ItemCode");
            txtArticulo.AutoCompleteMode         = AutoCompleteMode.Suggest;
            txtArticulo.AutoCompleteSource       = AutoCompleteSource.CustomSource;
        }
Esempio n. 9
0
        private void FrmConfirmacionTransferencia_Load(object sender, EventArgs e)
        {
            try
            {
                DataTable dtEstatus = new DataTable();
                dtEstatus.Columns.Add("Codigo", typeof(string));
                dtEstatus.Columns.Add("Nombre", typeof(string));

                DataRow dr1 = dtEstatus.NewRow();
                dr1["Codigo"] = "A"; dr1["Nombre"] = "Activo"; dtEstatus.Rows.Add(dr1);
                DataRow dr2 = dtEstatus.NewRow();
                dr2["Codigo"] = "O"; dr2["Nombre"] = "Cerrado"; dtEstatus.Rows.Add(dr2);
                DataRow dr3 = dtEstatus.NewRow();
                dr3["Codigo"] = "C"; dr3["Nombre"] = "Cancelado"; dtEstatus.Rows.Add(dr3);

                cboEstatus.DataSource    = dtEstatus;
                cboEstatus.DisplayMember = "Nombre";
                cboEstatus.ValueMember   = "Codigo";
                cboEstatus.SelectedIndex = 0;


                DataTable tbl_AlmacenesTemp = ClasesSGUV.DataSource.GetSource((int)ClasesSGUV.DataSource.TipoQry.AlmacenesVenta, string.Empty, string.Empty);
                DataTable tbl_Almacenes     = new DataTable();
                tbl_Almacenes = (from obj in tbl_AlmacenesTemp.AsEnumerable()
                                 where obj.Field <string>("Whscode") != "26" && obj.Field <string>("Whscode") != "T 197"
                                 select obj
                                 ).CopyToDataTable();

                cboAlmacen.DataSource    = tbl_Almacenes;
                cboAlmacen.DisplayMember = "WhsName";
                cboAlmacen.ValueMember   = "Whscode";
                cboAlmacen.SelectedIndex = 0;

                exportarToolStripButton.Visible   = false;
                actualizarToolStripButton.Visible = false;
                imprimirToolStripButton.Visible   = false;
                guardarToolStripButton.Click     += btnGuardar_Click;
                buscarStripButton.Click          += btnConsultarSolicitudes_Click;
                buscarStripButton.Enabled         = true;
                nuevoToolStripButton.Visible      = false;

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

                GridKeyActionMapping mapping = new GridKeyActionMapping(Keys.Enter, UltraGridAction.BelowCell, (UltraGridState)0, UltraGridState.InEdit, SpecialKeys.All, (SpecialKeys)0);
                this.dgvArticulos.KeyActionMappings.Add(mapping);
                //guardarToolStripButton.Visible = false;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
        }
Esempio n. 10
0
        private void ExcesoStock_Load(object sender, EventArgs e)
        {
            this.Icon = ClasesSGUV.Propiedades.IconHalcoNET;

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

            this.ListaArticulos();

            txtArticulo.AutoCompleteCustomSource = Autocomplete(Articul, "ItemCode");
            txtArticulo.AutoCompleteMode         = AutoCompleteMode.Suggest;
            txtArticulo.AutoCompleteSource       = AutoCompleteSource.CustomSource;
        }
Esempio n. 11
0
 private void FrmAltaKilometraje_Load(object sender, EventArgs e)
 {
     try
     {
         GridKeyActionMapping mapping = new GridKeyActionMapping(Keys.Enter, UltraGridAction.BelowCell, (UltraGridState)0, UltraGridState.InEdit, SpecialKeys.All, (SpecialKeys)0);
         this.dgvDatos.KeyActionMappings.Add(mapping);
         log = new ClasesSGUV.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);
     }
     catch (Exception EX)
     {
         MessageBox.Show(EX.Message.ToString());
     }
 }
Esempio n. 12
0
        private void IdealxLinea_Load(object sender, EventArgs e)
        {
            this.Icon = ClasesSGUV.Propiedades.IconHalcoNET;

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

            this.CargarLinea(clbLinea, "Todas");
            this.CargarProveedores(clbProveedor, "Todas");
            this.CargarCompradores(clbComprador, "Todos");

            DataTable tbl_almacenes = new DataTable();

            tbl_almacenes = ClasesSGUV.DataSource.GetSource((int)ClasesSGUV.DataSource.Tipos.AlmacenesVenta);

            DataRow row = tbl_almacenes.NewRow();

            row["WhsCode"] = "0";
            row["WhsName"] = "Todos";
            tbl_almacenes.Rows.InsertAt(row, 0);

            clbAlmacen.DataSource    = tbl_almacenes;
            clbAlmacen.DisplayMember = "WhsName";
            clbAlmacen.ValueMember   = "WhsCode";

            clbAlmacen.Click -= new EventHandler(ClasesSGUV.Forms.clb_Click);
            clbAlmacen.Click += new EventHandler(ClasesSGUV.Forms.clb_Click);

            cbLP.SelectedIndex            = 1;
            cbClasificacion.SelectedIndex = 0;

            DataTable tbl_Acciones = new DataTable();

            tbl_Acciones = connection.GetDataTable("SGUV",
                                                   "PJ_IdealLinea",
                                                   new string[] { },
                                                   new string[] { "@TipoConsulta" },
                                                   ref valuesOut, 7);

            udpAcciones.SetDataBinding(tbl_Acciones, null);
            udpAcciones.ValueMember   = "Name";
            udpAcciones.DisplayMember = "Name";
        }
Esempio n. 13
0
        private void frmPreeliminarConteo_Load(object sender, EventArgs e)
        {
            try
            {
                this.nuevoToolStripButton.Enabled   = false;
                this.guardarToolStripButton.Enabled = false;

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

                ClasesSGUV.Form.ControlsForms.setDataSource(cbAlmacenes, ClasesSGUV.DataSource.GetSource((int)ClasesSGUV.DataSource.TipoQry.AlmacenesVenta, null, string.Empty), "WhsName", "WhsCode", "---Selecciona un almacén---");
                ClasesSGUV.Form.ControlsForms.setDataSource(clbLinea, ClasesSGUV.DataSource.GetSource((int)ClasesSGUV.DataSource.TipoQry.Lineas, null, string.Empty), "ItmsGrpNam", "ItmsGrpCod", "---Todas---");

                clbLinea.Click -= new EventHandler(ClasesSGUV.Form.ControlsForms.clbBox_Click);
                clbLinea.Click += new EventHandler(ClasesSGUV.Form.ControlsForms.clbBox_Click);
            }
            catch (Exception ex)
            {
                MessageBox.Show("ERROR: " + ex.Message, "HalcoNET", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Esempio n. 14
0
        private void FrmClientesReparto_Load(object sender, EventArgs e)
        {
            try
            {
                int internetExplorerMajorVersion;
                internetExplorerMajorVersion = InternetExplorerBrowserEmulation.GetInternetExplorerMajorVersion();
                string version = internetExplorerMajorVersion.ToString(CultureInfo.InvariantCulture);
                lblVersionIE.Text = "Version Sugerida - Internet Explorer = v" + version;

                bCarga = true;
                cboSucursal.DataSource    = ConsultaSucursales();
                cboSucursal.ValueMember   = "Codigo";
                cboSucursal.DisplayMember = "Nombre";
                cboSucursal.SelectedIndex = -1;
                bCarga = false;
                log    = new ClasesSGUV.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
        }
Esempio n. 15
0
        private void FrmRepGeneral_Load(object sender, EventArgs e)
        {
            try
            {
                DataTable dtAnios = new DataTable(); dtAnios.Columns.Add("Anio", typeof(Int32));
                for (int i = 2010; i <= 2099; i++)
                {
                    DataRow dr = dtAnios.NewRow(); dr["Anio"] = i; dtAnios.Rows.Add(dr);
                }
                cboAnio.DataSource    = dtAnios; cboAnio.ValueMember = "Anio"; cboAnio.DisplayMember = "Anio";
                cboAnio.SelectedValue = DateTime.Now.Year;

                DataTable dtMeses = new DataTable(); dtMeses.Columns.Add("Mes", typeof(Int32)); dtMeses.Columns.Add("Descripcion", typeof(String));
                for (int i = 1; i <= 12; i++)
                {
                    DataRow            dr       = dtMeses.NewRow(); dr["Mes"] = i;
                    DateTimeFormatInfo dtinfo   = new CultureInfo("es-ES", false).DateTimeFormat;
                    string             NameMont = CultureInfo.InvariantCulture.TextInfo.ToTitleCase(dtinfo.GetMonthName(i));
                    dr["Descripcion"] = NameMont;

                    dtMeses.Rows.Add(dr);
                }
                cboMes.DataSource    = dtMeses; cboMes.ValueMember = "Mes"; cboMes.DisplayMember = "Descripcion";
                cboMes.SelectedValue = DateTime.Now.Month;

                cboPlacas.DataSource    = ConsultaPlacas();
                cboPlacas.ValueMember   = "Codigo";
                cboPlacas.DisplayMember = "Nombre";



                log = new ClasesSGUV.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
        }
Esempio n. 16
0
        private void FrmAltaFacturas_Load(object sender, EventArgs e)
        {
            try
            {
                log = new ClasesSGUV.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);

                dtFcrs.Columns.Add("idRelacion", typeof(Int32));
                dtFcrs.Columns.Add("iFolio", typeof(Int32));
                dtFcrs.Columns.Add("iFactura", typeof(Int32));
                dtFcrs.Columns.Add("Cliente", typeof(string));
                dtFcrs.Columns.Add("Fecha", typeof(DateTime));
                dtFcrs.Columns.Add("Tipo", typeof(string));


                cboProveedor.DataSource    = csLogistica.ConsultaCatalogo(20);
                cboProveedor.ValueMember   = "Codigo";
                cboProveedor.DisplayMember = "Nombre";
            }
            catch (Exception ex)
            {
                throw;
            }
        }
Esempio n. 17
0
        private void frmDM_Articulos_Load(object sender, EventArgs e)
        {
            try
            {
                Log = new ClasesSGUV.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);

                nuevoToolStripButton.Enabled      = false;
                guardarToolStripButton.Enabled    = false;
                actualizarToolStripButton.Enabled = false;
                buscarStripButton.Enabled         = true;

                tbl_Articulos = ClasesSGUV.DataSource.GetSource((int)ClasesSGUV.DataSource.TipoQry.GetArticulos, string.Empty, string.Empty);
                ClasesSGUV.Form.ControlsForms.Autocomplete(txtItemCode, tbl_Articulos.Copy(), "ItemCode");
                this.dgvDatos.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.Copy, true, true);

                ClasesSGUV.Form.ControlsForms.setDataSource(cbLinea, ClasesSGUV.DataSource.GetSource((int)ClasesSGUV.DataSource.TipoQry.LineasTodas, string.Empty, string.Empty), "ItmsGrpNam", "ItmsGrpCod", "--Línea--");

                buscarStripButton.Click -= new EventHandler(btn_Limpiar);
                buscarStripButton.Click += new EventHandler(btn_Limpiar);
            }
            catch (Exception)
            {
            }
        }
Esempio n. 18
0
        private void FrmAutorizacionesFoliosAux_Load(object sender, EventArgs e)
        {
            try
            {
                nuevoToolStripButton.Enabled      = false;
                guardarToolStripButton.Enabled    = false;
                actualizarToolStripButton.Enabled = false;
                exportarToolStripButton.Enabled   = false;


                if (ClasesSGUV.Login.Rol == 1)
                {
                    oTipoMovimiento = TipoMovimiento.Administrador;
                    PathHelp        = "http://hntsolutions.net/manual/module_10_5.htm?ms=AAAAAAA%3D&st=MA%3D%3D&sct=MzQxOA%3D%3D&mw=MjU1";
                }
                else if (ClasesSGUV.Login.Rol == 2)
                {
                    oTipoMovimiento = TipoMovimiento.Autorizacion;
                    PathHelp        = "http://hntsolutions.net/manual/module_10_5.htm?ms=AAAAAAA%3D&st=MA%3D%3D&sct=MzQxOA%3D%3D&mw=MjU1";
                }
                else if (ClasesSGUV.Login.Rol != 1 && ClasesSGUV.Login.Rol != 2)
                { //quiere decir que es otro perfil que no es administrador ni gte regional
                    oTipoMovimiento = TipoMovimiento.GenerarFolio;
                    PathHelp        = "http://hntsolutions.net/manual/module_10_6.htm?ms=AAAAAAA%3D&st=MA%3D%3D&sct=MzQxOA%3D%3D&mw=MjU1";
                }

                using (SqlConnection connection = new SqlConnection(ClasesSGUV.Propiedades.conectionLog))
                {
                    using (SqlCommand command = new SqlCommand("up_RutasADM", connection))
                    {
                        command.CommandType = CommandType.StoredProcedure;

                        command.Parameters.AddWithValue("@TipoConsulta", 11);
                        command.Parameters.AddWithValue("@RolUsuLog", ClasesSGUV.Login.Rol);
                        command.CommandTimeout = 0;

                        DataSet        ds = new DataSet();
                        SqlDataAdapter da = new SqlDataAdapter();
                        da.SelectCommand = command;
                        da.Fill(ds);

                        if (ds.Tables.Count > 0)
                        {
                            if (ds.Tables[0].Rows.Count > 0)
                            {
                                int Permiso = Convert.IsDBNull(ds.Tables[0].Rows[0]["PermisoFolios"]) ? 0 : Convert.ToInt32(ds.Tables[0].Rows[0]["PermisoFolios"]);
                                if (Permiso == 1)
                                {
                                    cboSucursal.Enabled = true;
                                }
                                else
                                {
                                    cboSucursal.Enabled = false;
                                }
                            }
                        }
                    }
                }

                using (SqlConnection connection = new SqlConnection(ClasesSGUV.Propiedades.conectionLog))
                {
                    using (SqlCommand command = new SqlCommand("up_RutasADM", connection))
                    {
                        command.CommandType = CommandType.StoredProcedure;

                        command.Parameters.AddWithValue("@TipoConsulta", 8);
                        command.CommandTimeout = 0;

                        DataTable      dt = new DataTable();
                        SqlDataAdapter da = new SqlDataAdapter();
                        da.SelectCommand = command;
                        da.Fill(dt);
                        cboSucursal.DataSource    = dt;
                        cboSucursal.ValueMember   = "Codigo";
                        cboSucursal.DisplayMember = "Nombre";
                        cboSucursal.SelectedIndex = -1;
                    }
                }

                if (cboSucursal.DataSource != null)
                {
                    cboSucursal.SelectedValue = ClasesSGUV.Login.ClaveSucursal;
                }

                log = new ClasesSGUV.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString(), "Bitacora de rutas", MessageBoxButtons.OK);
            }
        }
Esempio n. 19
0
        private void frmOrdenCompra_Load(object sender, EventArgs e)
        {
            try
            {
                Log = new ClasesSGUV.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);

                if (!this.Validar())
                {
                    btnCrear.Enabled    = false;
                    btnCancelar.Enabled = false;
                    return;
                }

                actualizarToolStripButton.Click -= new EventHandler(frmOrdenCompra_Load);
                actualizarToolStripButton.Click += new EventHandler(frmOrdenCompra_Load);

                dgvDatos.KeyDown -= new KeyEventHandler(ClasesSGUV.Form.ControlsForms.UltraGrid_KeyDown);
                dgvDatos.KeyDown += new KeyEventHandler(ClasesSGUV.Form.ControlsForms.UltraGrid_KeyDown);

                dgvDatos.KeyPress -= new KeyPressEventHandler(ClasesSGUV.Form.ControlsForms.UltraGrid_KeyPress);
                dgvDatos.KeyPress += new KeyPressEventHandler(ClasesSGUV.Form.ControlsForms.UltraGrid_KeyPress);

                this.dgvDatos.PerformAction(UltraGridAction.Copy, true, true);

                #region Evento Grid

                foreach (GridKeyActionMapping ugKey in dgvDatos.KeyActionMappings)
                {
                    if (ugKey.KeyCode == Keys.Enter)
                    {
                        dgvDatos.KeyActionMappings.Remove(ugKey);
                    }
                }

                this.dgvDatos.KeyActionMappings.Add(
                    new GridKeyActionMapping(
                        Keys.Enter,
                        UltraGridAction.BelowCell,
                        0,
                        0,
                        SpecialKeys.All,
                        0));
                #endregion

                guardarToolStripButton.Enabled = false;
                // ayudaToolStripButton.Enabled = false;
                PathHelp = "http://hntsolutions.net/manual/module_9_2_2.htm?ms=AAAAAAA%3D&st=MA%3D%3D&sct=NDEwMA%3D%3D&mw=MjU0";
                //
                //exportarToolStripButton.Enabled = false;
                actualizarToolStripButton.Enabled = false;

                buscarStripButton.Enabled       = true;
                imprimirToolStripButton.Enabled = true;

                nuevoToolStripButton.Click -= new EventHandler(btnNuevo_Click);
                nuevoToolStripButton.Click += new EventHandler(btnNuevo_Click);

                buscarStripButton.Click -= new EventHandler(btnBuscar_Click);
                buscarStripButton.Click += new EventHandler(btnBuscar_Click);

                imprimirToolStripButton.Click -= new EventHandler(btnImprimir_Click);
                imprimirToolStripButton.Click += new EventHandler(btnImprimir_Click);

                cerrarStripButton.Click -= new EventHandler(btnCerrar_Click);
                cerrarStripButton.Click += new EventHandler(btnCerrar_Click);

                dgvDatos.DisplayLayout.Override.AllowDelete = DefaultableBoolean.True;

                PathHelp = "http://hntsolutions.net/manual/module_14_2_2.htm?ms=AAAAAAA%3D&st=MA%3D%3D&sct=NDY1MQ%3D%3D&mw=MjU1";

                if (!String.IsNullOrWhiteSpace(txtFolio.Text))
                {
                    var kea = new KeyPressEventArgs(Convert.ToChar(13));
                    this.txtFolio_KeyPress(sender, kea);
                }

                dtpDocDate_ValueChanged(sender, e);
            }
            catch (Exception)
            {
                this.SetMensaje("Error: al cargar Form frm_Documentos", 5000, Color.Red, Color.White);
            }
        }
Esempio n. 20
0
        private void frm_Marbete_Load(object sender, EventArgs e)
        {
            try
            {
                Log = new ClasesSGUV.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);

                ClasesSGUV.Form.ControlsForms.setDataSource(cbLinea, ClasesSGUV.DataSource.GetSource((int)ClasesSGUV.DataSource.TipoQry.Lineas, null, string.Empty), "ItmsGrpNam", "ItmsGrpCod", "Todas");

                dgvDatos.DisplayLayout.Bands[0].AddNew();

                dgvDatos.DisplayLayout.Override.AllowAddNew = Infragistics.Win.UltraWinGrid.AllowAddNew.TemplateOnBottom;

                this.dgvDatos.UpdateMode = UpdateMode.OnRowChange;

                #region Evento Grid

                foreach (GridKeyActionMapping ugKey in dgvDatos.KeyActionMappings)
                {
                    if (ugKey.KeyCode == Keys.Enter)
                    {
                        dgvDatos.KeyActionMappings.Remove(ugKey);
                    }
                }

                this.dgvDatos.KeyActionMappings.Add(
                    new GridKeyActionMapping(
                        Keys.Enter,
                        UltraGridAction.BelowCell,
                        0,
                        0,
                        SpecialKeys.All,
                        0));

                dgvDatos.KeyPress -= new KeyPressEventHandler(ClasesSGUV.Form.ControlsForms.UltraGrid_KeyPress);
                dgvDatos.KeyPress += new KeyPressEventHandler(ClasesSGUV.Form.ControlsForms.UltraGrid_KeyPress);

                dgvDatos.KeyDown -= new System.Windows.Forms.KeyEventHandler(ClasesSGUV.Form.ControlsForms.UltraGrid_KeyDown);
                dgvDatos.KeyDown += new System.Windows.Forms.KeyEventHandler(ClasesSGUV.Form.ControlsForms.UltraGrid_KeyDown);
                #endregion

                #region Toolstrip
                this.exportarToolStripButton.Enabled   = false;
                this.imprimirToolStripButton.Enabled   = true;
                this.actualizarToolStripButton.Enabled = false;
                this.guardarToolStripButton.Enabled    = false;

                this.imprimirToolStripButton.Click -= new EventHandler(btn_Print);
                this.imprimirToolStripButton.Click += new EventHandler(btn_Print);

                this.nuevoToolStripButton.Click += new EventHandler(btn_Nuevo);
                this.nuevoToolStripButton.Click += new EventHandler(btn_Nuevo);

                // btn_Nuevo(sender, e);
                #endregion

                #region Autocompletables
                tbl_Items = ClasesSGUV.DataSource.GetSource((int)ClasesSGUV.DataSource.TipoQry.ItemsConteoInventario, "01", string.Empty);

                ultraCombo1.SetDataBinding(tbl_Items.Copy(), null);
                ultraCombo1.ValueMember   = "ItemCode";
                ultraCombo1.DisplayMember = "ItemCode";

                ultraCombo2.SetDataBinding(tbl_Items.Copy(), null);
                ultraCombo2.ValueMember   = "ItemName";
                ultraCombo2.DisplayMember = "ItemName";

                ////ultraCombo1.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend;
                #endregion
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error: " + ex.Message, "HalcoNET", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Esempio n. 21
0
        private void frmOrdenCompra_Load(object sender, EventArgs e)
        {
            try
            {
                Log = new ClasesSGUV.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);

                //if (!this.Validar())
                //{
                //    btnCrear.Enabled = false;
                //    btnCancelar.Enabled = false;
                //    return;
                //}

                actualizarToolStripButton.Click -= new EventHandler(frmOrdenCompra_Load);
                actualizarToolStripButton.Click += new EventHandler(frmOrdenCompra_Load);

                dgvDatos.KeyDown -= new KeyEventHandler(ClasesSGUV.Form.ControlsForms.UltraGrid_KeyDown);
                dgvDatos.KeyDown += new KeyEventHandler(ClasesSGUV.Form.ControlsForms.UltraGrid_KeyDown);

                dgvDatos.KeyPress -= new KeyPressEventHandler(ClasesSGUV.Form.ControlsForms.UltraGrid_KeyPress);
                dgvDatos.KeyPress += new KeyPressEventHandler(ClasesSGUV.Form.ControlsForms.UltraGrid_KeyPress);

                this.dgvDatos.PerformAction(UltraGridAction.Copy, true, true);
                this.dgvDatos.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.DeleteRows);

                #region Evento Grid

                foreach (GridKeyActionMapping ugKey in dgvDatos.KeyActionMappings)
                {
                    if (ugKey.KeyCode == Keys.Enter)
                    {
                        dgvDatos.KeyActionMappings.Remove(ugKey);
                    }
                }

                this.dgvDatos.KeyActionMappings.Add(
                    new GridKeyActionMapping(
                        Keys.Enter,
                        UltraGridAction.BelowCell,
                        0,
                        0,
                        SpecialKeys.All,
                        0));
                #endregion


                nuevoToolStripButton.Click -= new EventHandler(btnNuevo_Click);
                nuevoToolStripButton.Click += new EventHandler(btnNuevo_Click);

                buscarStripButton.Click -= new EventHandler(btnBuscar_Click);
                buscarStripButton.Click += new EventHandler(btnBuscar_Click);

                imprimirToolStripButton.Click -= new EventHandler(btnImprimir_Click);
                imprimirToolStripButton.Click += new EventHandler(btnImprimir_Click);

                cerrarStripButton.Click -= new EventHandler(btnCerrar_Click);
                cerrarStripButton.Click += new EventHandler(btnCerrar_Click);

                this.Formulario_Modo();
            }
            catch (Exception)
            {
                this.SetMensaje("Error: al cargar Form frm_Documentos", 5000, Color.Red, Color.White);
            }
        }
Esempio n. 22
0
 public frmArribos(int _slpcode)
 {
     InitializeComponent();
     log      = new ClasesSGUV.Logs(ClasesSGUV.Login.NombreUsuario, this.AccessibleDescription, 0);
     Vendedor = _slpcode;
 }