Example #1
0
        //---------------------------------------------------------------------------------------------------------------EVENTO PARA LA ETIQUETA EN EL DATAG DE LOS PRODUCTOS
        private void cotizMouseD(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            ProdRequeridos prodCot = dGproductRequi.SelectedItem as ProdRequeridos;
            rowToCotizar = prodCot;

            if (prodCot == null)
            {
                //MessageBox.Show("Null en click");
                return;
            }

                if (prodCot.stat.Equals("Cotizado"))
                {

                    MessageBoxResult r = MessageBox.Show("El producto ya esta cotizado\n ¿Desea volver a cotizarlo?", "Confirmación", MessageBoxButton.YesNo, MessageBoxImage.Question);

                    if (r == MessageBoxResult.Yes)
                    {
                        openPopToCotiz();
                    }
                    else
                    {
                        return;
                    }
                }
                openPopToCotiz();
                //openPopToCotiz(prodCot);
        }
Example #2
0
        private void dobleCoti(object sender, MouseButtonEventArgs e)
        {
            ProdRequeridos prodCot = dGproductRequi.SelectedItem as ProdRequeridos;
            rowToCotizar = prodCot;

            if (prodCot == null)
            {
                //MessageBox.Show("Null en click");
                return;
            }

            if (dGproductRequi.CurrentColumn.Header.Equals("OC/GM"))
            {
                return;
            }
            else{
                indiceActual = prodCot.indice;
                if (prodCot.stat.Equals("Cotizado"))
                {

                MessageBoxResult r = MessageBox.Show("El producto ya esta cotizado\n ¿Desea volver a cotizarlo?", "Confirmación", MessageBoxButton.YesNo, MessageBoxImage.Question);

                if (r == MessageBoxResult.Yes)
                {
                    openPopToCotiz();
                }
                else
                {
                    return;
                }
            }
            openPopToCotiz();
            }
        }
Example #3
0
        //--------------------------------------------------------------------------------------------------------SELECT CHANGE PARA TOMAR EL RENGLON DEL PROD A COTIZAR
        private void cotizarProdDg(object sender, SelectionChangedEventArgs e)
        {
            ProdRequeridos prodCo = dGproductRequi.SelectedItem as ProdRequeridos;

            if (prodCo == null)
            {
                return;
            }
            MessageBox.Show("IndiceActual " + prodCo.indice + " NomProdSelec "+prodCo.nombreProdu);
            //Console.Write("Indice Actual "+prodCo.indice);
            //Console.Read();
            rowToCotizar = prodCo;
            MessageBox.Show("IndiceActual con rowToCotizar " + rowToCotizar.indice);
            //MessageBox.Show("IndAct rowToCo " + rowToCotizar.indice + " IndAct " + prodCo.indice);
            indiceActual = prodCo.indice;

            //if (dGproductRequi.CurrentColumn.Header != null)
              //{
            if (dGproductRequi.CurrentColumn.Header.Equals("OC/GM") ||/* dGproductRequi.CurrentColumn.Header.Equals("Status") ||*/ dGproductRequi.CurrentColumn.Header.Equals("IDP"))
            {
                return;
            }
            else {
                if (prodCo.stat.Equals("Cotizado"))
                {

                    MessageBoxResult r = MessageBox.Show("El producto ya esta cotizado\n ¿Desea volver a cotizarlo?", "Confirmación", MessageBoxButton.YesNo, MessageBoxImage.Question);
                    //indiceActual = prodCo.indice;
                    //MessageBox.Show("Indice Actual en SelectChanged para el prod a cotizar "+indiceActual);
                    if (r == MessageBoxResult.Yes)
                    {

                        openPopToCotiz();
                        //openPopToCotiz(rowToCotizar);
                        /*
                        cotizac.IsOpen = true;
                        blockInterfaz();

                        var roww = (from p in listaProductosRequi
                                    where p.idPro == prodCo.idPro
                                    select p);
                        foreach (var x in roww)
                        {
                            idProdSeleccCotiz = x.idPro;
                            idReqDetCotiz = x.idReqDetProdReq;
                        }
                        MessageBox.Show("ID R " + idProdSeleccCotiz + " ID Rdet -> " + idReqDetCotiz);
                        muestraTotal();
                        muestraDatosRequi();
                        llenaProductosdeRequi();
                        //LLENA EL POPUP
                        fillPopProd();*/
                    }
                    else { return; }

                }
                else
                {

                    if (dGproductRequi.CurrentColumn.Header.Equals("OC/GM") /*|| dGproductRequi.CurrentColumn.Header.Equals("Status") */|| dGproductRequi.CurrentColumn.Header.Equals("IDP"))
                    {
                        return;
                    }
                    openPopToCotiz();
                    //openPopToCotiz(rowToCotizar);
                }
            }

            //}else{ return; }
        }