Ejemplo n.º 1
0
 private void barButtonItemMarca_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     ConfigGenerales.FormAgregar agregar = new ConfigGenerales.FormAgregar("Marca", "Agregar");
     agregar.ShowDialog();
     //Marca.FormNuevaMarca form = new Marca.FormNuevaMarca();
     //form.ShowDialog();
 }
Ejemplo n.º 2
0
 private void barButtonItemBodega_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     ConfigGenerales.FormAgregar agregar = new ConfigGenerales.FormAgregar("Bodega", "Agregar");
     agregar.ShowDialog();
     //Bodegas.FormBodegas form = new Bodegas.FormBodegas();
     //form.ShowDialog();
 }
Ejemplo n.º 3
0
 private void barButtonItemSubLinea_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     ConfigGenerales.FormAgregar agregar = new ConfigGenerales.FormAgregar("Sub linea", "Agregar");
     agregar.ShowDialog();
     //Sublinea.FormSublinea form = new Sublinea.FormSublinea();
     //form.ShowDialog();
 }
Ejemplo n.º 4
0
        private void DashBoard_KeyUp(object sender, KeyEventArgs e)
        {
            if (Convert.ToInt32(e.KeyData) == Convert.ToInt32(Keys.Control) + Convert.ToInt32(Keys.N))
            {
                Productos.FormProductos agregar = new Productos.FormProductos("Agregar");
                agregar.MdiParent = this;
                agregar.Show();
            }

            if (Convert.ToInt32(e.KeyData) == Convert.ToInt32(Keys.Control) + Convert.ToInt32(Keys.Shift) + Convert.ToInt32(Keys.L))
            {
                ConfigGenerales.FormAgregar agregar = new ConfigGenerales.FormAgregar("Linea", "Agregar");
                agregar.ShowDialog();
            }
            if (Convert.ToInt32(e.KeyData) == Convert.ToInt32(Keys.Control) + Convert.ToInt32(Keys.Shift) + Convert.ToInt32(Keys.S))
            {
                ConfigGenerales.FormAgregar agregar = new ConfigGenerales.FormAgregar("Sub linea", "Agregar");
                agregar.ShowDialog();
            }
            if (Convert.ToInt32(e.KeyData) == Convert.ToInt32(Keys.Control) + Convert.ToInt32(Keys.Shift) + Convert.ToInt32(Keys.M))
            {
                ConfigGenerales.FormAgregar agregar = new ConfigGenerales.FormAgregar("Marca", "Agregar");
                agregar.ShowDialog();
            }
            if (Convert.ToInt32(e.KeyData) == Convert.ToInt32(Keys.Control) + Convert.ToInt32(Keys.Shift) + Convert.ToInt32(Keys.B))
            {
                ConfigGenerales.FormAgregar agregar = new ConfigGenerales.FormAgregar("Bodega", "Agregar");
                agregar.ShowDialog();
            }
            if (Convert.ToInt32(e.KeyData) == Convert.ToInt32(Keys.Control) + Convert.ToInt32(Keys.Shift) + Convert.ToInt32(Keys.R))
            {
                Requisicioes.FormRequisicion requisiciones = Requisicioes.FormRequisicion.GetInstancia();
                requisiciones.MdiParent = this;
                requisiciones.Show();
            }
            if (Convert.ToInt32(e.KeyData) == Convert.ToInt32(Keys.Control) + Convert.ToInt32(Keys.Shift) + Convert.ToInt32(Keys.O))
            {
                GenerarOrdenCompra.FormGenerarOrdenCompra orden = GenerarOrdenCompra.FormGenerarOrdenCompra.GetInstacnia();
                orden.MdiParent = this;
                orden.Show();
            }
        }
        public void Editar()
        {
            int     id_linea     = 0;
            decimal descuento    = 0;
            string  abreviatura  = "";
            string  tipo_edicion = "";

            if (tipo_listado.Equals("Lineas"))
            {
                tipo_edicion = "Linea";
                id_linea     = Convert.ToInt32(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "idlinea"));
                descuento    = Convert.ToDecimal(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "Descuento"));
            }
            if (tipo_listado.Equals("Sub lineas"))
            {
                tipo_edicion = "Sub linea";
                id_linea     = Convert.ToInt32(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "idlinea"));
                descuento    = Convert.ToDecimal(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "Descuento"));
                abreviatura  = Convert.ToString(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "Abreviatura"));
            }
            if (tipo_listado.Equals("Marcas"))
            {
                tipo_edicion = "Marca";
                id_linea     = 0;
            }
            if (tipo_listado.Equals("Bodegas"))
            {
                tipo_edicion = "Bodega";
                id_linea     = 0;
            }

            FormAgregar editar = new FormAgregar(tipo_edicion, "Editar");

            editar.MostrarDatosParaEditar(
                Convert.ToInt32(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, gridView1.Columns[0]))
                , id_linea
                , Convert.ToString(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "Nombre"))
                , Convert.ToString(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "Descripción"))
                , descuento
                , abreviatura);
            editar.ShowDialog();

            if (tipo_listado.Equals("Lineas"))
            {
                gridControlList.DataSource = ControllerLinea.MostrarLineas();
            }
            if (tipo_listado.Equals("Sub lineas"))
            {
                gridControlList.DataSource   = ControllerSubLinea.MostrarSubLienasParaElModulo();
                gridView1.Columns[5].Visible = false;
            }
            if (tipo_listado.Equals("Marcas"))
            {
                gridControlList.DataSource = ControllerMarca.MostrarMarcas();
            }
            if (tipo_listado.Equals("Bodegas"))
            {
                gridControlList.DataSource = ControllerBodega.MostrarBodega(Configuraciones.Configuraciones.idtienda);
            }
            gridView1.Columns[0].Visible = false;
            gridControlList.ForceInitialize();
            gridView1.BestFitColumns();
        }