Beispiel #1
0
        private bool fncGrabaLinea()
        {
            bool vOk = false;

            cAlbaranesCompra.LinAlbCompra cLinCompra = new cAlbaranesCompra.LinAlbCompra();
            cAlbaranesCompra.CabAlbCompra cCabCompra = new cAlbaranesCompra.CabAlbCompra();



            try
            {
                int vId = Convert.ToInt32(txId.Text);
                cLinCompra.Id = vId;


                string vCT = "Cantidad";
                string vTx = txCan.Text.Replace(",", ".");
                cLinCompra.fncGrabaCampo(vCT, vTx);

                vCT = "Lote";
                vTx = txLote.Text;
                cLinCompra.fncGrabaCampo(vCT, vTx);

                vCT = "Obs";
                vTx = txObs.Text;
                cLinCompra.fncGrabaCampo(vCT, vTx);

                vCT = "NumPed";
                vTx = txPedido.Text;
                cLinCompra.fncGrabaCampo(vCT, vTx);

                vCT = "RecepcionadoPor";
                vTx = txRecepPor.Text;
                cLinCompra.fncGrabaCampo(vCT, vTx);

                vCT = "Cert";
                vTx = txCert.Text;
                cLinCompra.fncGrabaCampo(vCT, vTx);

                vCT = "Grabado";
                vTx = "0";
                cLinCompra.fncGrabaCampo(vCT, vTx);


                if (cCabCompra.fncExiste(cParamXml.Emp, oLinAlb.NumAlb))
                {
                    vCT = "SuAlbaran";
                    vTx = txSuAlbaran.Text;
                    cCabCompra.fncGrabaCampo(vCT, vTx);
                }


                vOk = fncGrabaCert(txCert.Text, txProd.Text, txLote.Text);
            }
            catch (Exception ex) { vError = ex.Message; }

            return(vOk);
        }
Beispiel #2
0
        private void sbrCargaLinea(int vFil)
        {
            sbrLimpiaEnt();



            string vId       = grLista.Rows[vFil].Cells["Id"].Value.ToString();
            string vCan      = grLista.Rows[vFil].Cells["Cantidad"].Value.ToString();
            string vLote     = grLista.Rows[vFil].Cells["Lote"].Value.ToString();
            string vObs      = grLista.Rows[vFil].Cells["Obs"].Value.ToString();
            string vPed      = grLista.Rows[vFil].Cells["NumPed"].Value.ToString();
            string vRecep    = grLista.Rows[vFil].Cells["RecepcionadoPor"].Value.ToString();
            string vCert     = grLista.Rows[vFil].Cells["Cert"].Value.ToString();
            string vProd     = grLista.Rows[vFil].Cells["Producto"].Value.ToString();
            string vDesProd  = grLista.Rows[vFil].Cells["Descripción"].Value.ToString();
            string vError    = grLista.Rows[vFil].Cells["error"].Value.ToString();
            string vUbi      = grLista.Rows[vFil].Cells["Ubi"].Value.ToString();
            string vNumSerie = grLista.Rows[vFil].Cells["NumSerie"].Value.ToString();
            string vCertSN   = "NO";



            oLinAlb.Cantidad        = Convert.ToDecimal(vCan);
            oLinAlb.Lote            = vLote;
            oLinAlb.RecepcionadoPor = vRecep;
            if (vCert != "")
            {
                vCertSN = "SI";
            }
            oLinAlb.Cert            = vCertSN;
            oLinAlb.Producto        = vProd;
            oLinAlb.Descripción     = vDesProd;
            oLinAlb.CodProv         = grLista.Rows[vFil].Cells["CodProv"].Value.ToString();
            oLinAlb.NombreProv      = grLista.Rows[vFil].Cells["NombreProv"].Value.ToString();
            oLinAlb.SuAlb           = grLista.Rows[vFil].Cells["SuAlbaran"].Value.ToString();
            oLinAlb.RecepcionadoPor = vRecep;
            oLinAlb.FechaEntrega    = Convert.ToDateTime(grLista.Rows[vFil].Cells["FechaEntrega"].Value.ToString());
            oLinAlb.NumAlb          = grLista.Rows[vFil].Cells["NumAlb"].Value.ToString();
            oLinAlb.Ubi             = vUbi;
            oLinAlb.NumSerie        = vNumSerie;

            txId.Text       = vId;
            txCan.Text      = vCan;
            txLote.Text     = vLote;
            txObs.Text      = vObs;
            txPedido.Text   = vPed;
            txRecepPor.Text = vRecep;
            txCert.Text     = vCert;
            txProd.Text     = vProd;
            txDesProd.Text  = vDesProd;

            txSuAlbaran.Text = "";
            if (oCabCompra.fncExiste(cParamXml.Emp, oLinAlb.NumAlb))
            {
                txSuAlbaran.Text = oCabCompra.SuAlbaran;
            }


            btEtiqueta.Visible = false;


            if (txCan.Text != "0")
            {
                btEtiqueta.Visible = true;
            }

            if (vError == "Pendiente de Grabar")
            {
            }
            return;
        }