示例#1
0
 private void BtnLimpiar_Click(object sender, EventArgs e)
 {
     TxtPrecio.Text = String.Empty;
     TxtPrecio.Focus();
     Lblva.Visible         = false;
     LblTotalPagar.Visible = false;
 }
        private void button1_Click(object sender, EventArgs e)
        {
            if (TxtProducto.Text.Trim().Length == 0)
            {
                MessageBox.Show("Ingresar la cantidad del Producto");
                TxtProducto.Focus();
                return;
            }
            if (TxtPrecio.Text.Trim().Length == 0)
            {
                MessageBox.Show("Ingresar el Precio del Producto");
                TxtPrecio.Focus();
                return;
            }



            double prod, prec, impto, tot, totisv;


            prod = Convert.ToDouble(TxtProducto.Text);
            prec = Convert.ToDouble(TxtPrecio.Text);


            tot    = prod * prec;
            impto  = tot * 0.15;
            totisv = tot + impto;

            TxtTotal.Text    = tot.ToString();
            TxtImpto.Text    = impto.ToString();
            TxtTotalISV.Text = totisv.ToString();
        }
示例#3
0
        private void BtnCalcular_Click(object sender, EventArgs e)
        {
            if (TxtCantidad.Text.Trim().Length == 0)
            {
                MessageBox.Show("Ingrese Cantidad");
                TxtCantidad.Focus();
                return;
            }
            if (TxtPrecio.Text.Trim().Length == 0)
            {
                MessageBox.Show("Ingrese Precio");
                TxtPrecio.Focus();
                return;
            }
            double c, p, subt, t, tp;

            c = Convert.ToDouble(TxtCantidad.Text);
            p = Convert.ToDouble(TxtPrecio.Text);
            if (c >= 3)
            {
                t                   = c * p;
                subt                = (c * p) * 0.20;
                tp                  = t - subt;
                TxtSubtotal.Text    = subt.ToString();
                TxtTotalaPagar.Text = tp.ToString();
            }
            else
            {
                t                   = c * p;
                subt                = (c * p) * 0.20;
                tp                  = t - subt;
                TxtSubtotal.Text    = subt.ToString();
                TxtTotalaPagar.Text = tp.ToString();
            }
        }
        private void BtnCalcular_Click(object sender, EventArgs e)
        {
            if (TxtDias.Text.Trim().Length == 0)
            {
                MessageBox.Show("Ingresar los Dias Trabajados");
                TxtDias.Focus();
                return;
            }
            if (TxtPrecio.Text.Trim().Length == 0)
            {
                MessageBox.Show("Ingresar los Dias Trabajados");
                TxtPrecio.Focus();
                return;
            }

            double d, p, tot;

            d = Convert.ToDouble(TxtDias.Text);

            p = Convert.ToDouble(TxtPrecio.Text);

            tot = d * p;

            TxtSalario.Text = tot.ToString();
        }
示例#5
0
        protected void BtnGrabarPedido_Click(object sender, EventArgs e)
        {
            if (Session.Count == 0)
            {
                LblMensaje.Text = "Debe Acceder Cuenta con su Usuario y Contraseña";
                return;
            }
            if (TxtCantidad.Text.Trim() == "")
            {
                LblMensaje.Text = "Ingrese Cantidad";
                TxtCantidad.Focus();
                return;
            }
            if (TxtPrecio.Text.Trim() == "")
            {
                LblMensaje.Text = "Ingrese Precio";
                TxtPrecio.Focus();
                return;
            }

            GrabarCabecera();
            try
            {
                Ent.Idpedido = int.Parse(0 + TxtIdPedido.Text);
                Ent.Iditem   = int.Parse(DDLItem.SelectedValue);
                Ent.Cantidad = Double.Parse(0 + TxtCantidad.Text);
                Ent.Precio   = Double.Parse(0 + TxtPrecio.Text);
                Ent.Importe  = Double.Parse(0 + TxtCantidad.Text) * Double.Parse(0 + TxtPrecio.Text);

                int filas;
                filas = NegPedidos.GrabarPedidoDetalle(Ent);
                if (filas > 0)
                {
                    RellenarPedidoDetalle();
                }
            }
            catch (Exception ex)
            {
                LblMensaje.Text = ex.Message;
            }
        }
        private void BtnCalcular_Click(object sender, EventArgs e)
        {
            if (TxtDias.Text.Trim().Length == 0)
            {
                MessageBox.Show("Ingresar los Dias Trabajados");
                TxtDias.Focus();
                return;
            }
            if (TxtPrecio.Text.Trim().Length == 0)
            {
                MessageBox.Show("Ingresar Precio por Dia Trabajado");
                TxtPrecio.Focus();
                return;
            }
            if (TxtHe.Text.Trim().Length == 0)
            {
                MessageBox.Show("Ingresar la Cantidad de Horas Extras");
                TxtHe.Focus();
                return;
            }
            if (TxtPhe.Text.Trim().Length == 0)
            {
                MessageBox.Show("Ingresar la Precio por Hora Extra");
                TxtPhe.Focus();
                return;
            }
            double d, p, t, he, ph, the, sn;

            d   = Convert.ToDouble(TxtDias.Text);
            p   = Convert.ToDouble(TxtPrecio.Text);
            he  = Convert.ToDouble(TxtHe.Text);
            ph  = Convert.ToDouble(TxtPhe.Text);
            t   = d * p;
            the = he * ph;
            sn  = t + the;

            TxtSalarioBase.Text  = t.ToString();
            TxtSalarioExtra.Text = the.ToString();
            TxtSalarioNeto.Text  = sn.ToString();
        }
示例#7
0
        private void BtnCalcular_Click(object sender, EventArgs e)
        {
            if (TxtCantidad.Text.Trim().Length == 0)
            {
                MessageBox.Show("Ingrese Cantidad");
                TxtCantidad.Focus();
                return;
            }
            if (TxtPrecio.Text.Trim().Length == 0)
            {
                MessageBox.Show("Ingrese Precio");
                TxtPrecio.Focus();
                return;
            }

            double c, p, t;

            c = Convert.ToDouble(TxtCantidad.Text);
            p = Convert.ToDouble(TxtPrecio.Text);

            t = c * p;

            TxtTotal.Text = t.ToString();
        }
示例#8
0
        bool CamposOK()
        {
            bool booEstado = true;

            TxtCodPro.Text = GeneraCodigoProducto();

            if (Convert.ToInt16(CboTipExi.SelectedValue) == 0)
            {
                MessageBox.Show("¡ No ha especificado el tipo de existencia !", "", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                booEstado = false;
                CboTipExi.Focus();
                return(booEstado);
            }

            if (Convert.ToInt16(CboFam.SelectedValue) == 0)
            {
                MessageBox.Show("¡ No ha especificado la familia del servicio !", "", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                booEstado = false;
                CboFam.Focus();
                return(booEstado);
            }

            if (Convert.ToInt16(CboCla.SelectedValue) == 0)
            {
                MessageBox.Show("¡ No ha especificado la clase del servicio !", "", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                booEstado = false;
                CboCla.Focus();
                return(booEstado);
            }
            if (Convert.ToInt16(CboSubCla.SelectedValue) == 0)
            {
                MessageBox.Show("¡ No ha especificado la sub clase del servicio !", "", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                booEstado = false;
                CboSubCla.Focus();
                return(booEstado);
            }
            //if (Convert.ToInt16(CboUniMed.SelectedValue) == 0)
            //{
            //    MessageBox.Show("¡ No ha especificado la unidad de medida del servicio !", "", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
            //    booEstado = false;
            //    CboUniMed.Focus();
            //    return booEstado;
            //}
            if (Convert.ToInt16(CboMoneda.SelectedValue) == 0)
            {
                MessageBox.Show("¡ No ha especificado la moneda del servicio !", "", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                booEstado = false;
                CboMoneda.Focus();
                return(booEstado);
            }
            if (Convert.ToInt16(CboPlay.SelectedValue) == 0)
            {
                MessageBox.Show("¡ No ha especificado la playa de venta del servicio !", "", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                booEstado = false;
                CboPlay.Focus();
                return(booEstado);
            }
            if (funFunciones.NulosC(TxtCodPro.Text) == "")
            {
                MessageBox.Show("¡ No ha especificado el codigo del servicio !", "", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                booEstado = false;
                TxtCodPro.Focus();
                return(booEstado);
            }
            if (funFunciones.NulosC(TxtDesc.Text) == "")
            {
                MessageBox.Show("¡ No ha especificado la descripcion del servicio !", "", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                booEstado = false;
                TxtDesc.Focus();
                return(booEstado);
            }
            if (OptSiPagSer.Checked == true)
            {
                if (funFunciones.NulosC(TxtPrecio.Text) == "")
                {
                    MessageBox.Show("¡ No ha especificado el precio bruto del servicio !", "", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                    booEstado = false;
                    TxtPrecio.Focus();
                    return(booEstado);
                }
            }
            return(booEstado);
        }