Example #1
0
 /// <summary>
 /// Reporte Artículos por Compra.
 /// </summary>
 public List<BEDocument> Get_PPRP_SPLS_COM3(BEDocument obj)
 {
     using (var odr = oda.Get_PPRP_SPLS_COM3(obj))
     {
         var olst = new List<BEDocument>();
         ((IList)olst).LoadFromReader<BEDocument>(odr);
         Dispose(false);
         return (olst);
     }
 }
Example #2
0
 /// <summary>
 /// Retorna los gastos de nacionalización según la guía de compra seleccionada.
 /// </summary>
 public List<BEDocumentExpenses> Get_PSCP_SPLS_SCPC_GANA(BEDocument obj)
 {
     using (var odr = oda.Get_PSCP_SPLS_SCPC_GANA(obj))
     {
         var olst = new List<BEDocumentExpenses>();
         ((IList)olst).LoadFromReader<BEDocumentExpenses>(odr);
         Dispose(false);
         return (olst);
     }
 }
Example #3
0
 /// <summary>
 /// Reporte Registro de Compras Importadas.
 /// </summary>
 public IDataReader Get_PPRP_SPLS_COM2(BEDocument obj)
 {
     try
     {
         if (ocn.State == ConnectionState.Closed) ocn.Open();
         var ocmd = odb.GetStoredProcCommand("PPRP_SPLS_COM2", obj.FEC_REGI_INIC, obj.FEC_REGI_FINA, obj.COD_SUCU);
         ocmd.CommandTimeout = 2000;
         var odr = odb.ExecuteReader(ocmd);
         Dispose(false);
         return (odr);
     }
     finally
     {
         ocn.Close();
     }
 }
Example #4
0
 /// <summary>
 /// Retorna los gastos de nacionalización según la guía de compra seleccionada.
 /// </summary>
 public IDataReader Get_PSCP_SPLS_SCPC_GANA(BEDocument obj)
 {
     try
     {
         if (ocn.State == ConnectionState.Closed) ocn.Open();
         var ocmd = odb.GetStoredProcCommand("PSCP_SPLS_SCPC_GANA", obj.COD_DOCU);
         ocmd.CommandTimeout = 2000;
         var odr = odb.ExecuteReader(ocmd);
         Dispose(false);
         return (odr);
     }
     finally
     {
         ocn.Close();
     }
 }
Example #5
0
        private void Set_Invoice(BEDocument row)
        {
            ClearControls();
            txtCOD_DOCU.Text = row.COD_DOCU.ToString();
            rdgIND_TIPO_COMP.EditValue = row.IND_TIPO_COMP;
            bteCOD_SOCI_NEGO.Properties.Buttons[0].Caption = row.COD_SOCI_NEGO.ToString();
            bteCOD_SOCI_NEGO.Text = row.ALF_SOCI_NEGO;
            txtALF_NUM_SERI.Text = row.ALF_NUM_SERI;
            txtALF_NUM_CORR.Text = row.ALF_NUM_CORR;
            lkeCOD_COND_PAGO.EditValue = row.COD_COND_PAGO;
            lkeCOD_ALMA.EditValue = row.COD_ALMA;
            lkeCOD_MONE.EditValue = row.COD_MONE;
            txtNUM_TIPO_CAMB.EditValue = row.NUM_TIPO_CAMB;
            lkeIND_ESTA.EditValue = row.IND_ESTA;
            dteFEC_REGI.EditValue = row.FEC_REGI;
            dteFEC_ENTR.EditValue = row.FEC_ENTR;
            dteFEC_DOCU.EditValue = row.FEC_DOCU;
            dteFEC_PAGO.EditValue = row.FEC_PAGO;
            txtALF_NUM_RUCC.Text = row.ALF_NUM_RUCC;
            mmeALF_DIRE_FISC.Text = row.ALF_DIRE_FISC;
            mmeALF_DIRE_ENTR.Text = row.ALF_DIRE_ENTR;
            mmeALF_COME.Text = row.ALF_COME;

            var obj = new BEDocument() { COD_DOCU = row.COD_DOCU };
            var obr = new BRPurchase();
            var olst = obr.Get_PSCP_SPLS_SCPD_OINV(obj);

            gdcLines.DataSource = olst;
            gdvLines.RefreshData();

            txtNUM_SUBB_TOTA.EditValue = row.NUM_SUBB_TOTA;
            txtNUM_DESC.EditValue = row.NUM_DESC;
            txtNUM_IGVV.EditValue = row.NUM_IGVV;
            txtNUM_TOTA.EditValue = row.NUM_TOTA;

            var SIMB = (BESVMC_MONE)lkeCOD_MONE.GetSelectedDataRow();
            var molt = new BRNumLetter();
            lblTotalLetter.Text = molt.Convertir(row.NUM_TOTA.ToString(), true, SIMB.ALF_MONE_SIMB);

            StateControls(true);
            txtCOD_DOCU.Focus();
        }
Example #6
0
        private void Set_DocumentBase()
        {
            ClearControls();
            StateControls(false);

            rdgIND_TIPO_COMP.EditValue = docb.IND_TIPO_COMP;
            bteCOD_SOCI_NEGO.Properties.Buttons[0].Caption = docb.COD_SOCI_NEGO.ToString();
            bteCOD_SOCI_NEGO.Text = docb.ALF_SOCI_NEGO;
            lkeCOD_COND_PAGO.EditValue = docb.COD_COND_PAGO;
            lkeCOD_ALMA.EditValue = docb.COD_ALMA;
            lkeCOD_MONE.EditValue = docb.COD_MONE;
            txtNUM_TIPO_CAMB.EditValue = docb.NUM_TIPO_CAMB;
            lkeIND_ESTA.EditValue = docb.IND_ESTA;
            dteFEC_REGI.EditValue = docb.FEC_REGI;
            dteFEC_ENTR.EditValue = docb.FEC_ENTR;
            dteFEC_DOCU.EditValue = docb.FEC_DOCU;
            dteFEC_PAGO.EditValue = docb.FEC_PAGO;
            txtALF_NUM_RUCC.Text = docb.ALF_NUM_RUCC;
            mmeALF_DIRE_FISC.Text = docb.ALF_DIRE_FISC;
            mmeALF_DIRE_ENTR.Text = docb.ALF_DIRE_ENTR;
            mmeALF_COME.Text = docb.ALF_COME;

            var obj = new BEDocument() { COD_DOCU = docb.COD_DOCU };
            var obr = new BRPurchase();
            var olst = obr.Get_PSCP_SPLS_SCPD_GUIA(obj);
            olst.ForEach(item =>
            {
                item.TIP_DOCU_BASE = 2;
                item.COD_DOCU_BASE = item.COD_DOCU;
                item.NUM_LINE_BASE = item.NUM_LINE;
                item.COD_ARTI_BASE = item.COD_ARTI;
            });

            gdcLines.DataSource = olst;
            gdvLines.RefreshData();

            txtNUM_SUBB_TOTA.EditValue = docb.NUM_SUBB_TOTA;
            txtNUM_DESC.EditValue = docb.NUM_DESC;
            txtNUM_IGVV.EditValue = docb.NUM_IGVV;
            txtNUM_TOTA.EditValue = docb.NUM_TOTA;

            var SIMB = (BESVMC_MONE)lkeCOD_MONE.GetSelectedDataRow();
            var molt = new BRNumLetter();
            lblTotalLetter.Text = molt.Convertir(docb.NUM_TOTA.ToString(), true, SIMB.ALF_MONE_SIMB);
        }
Example #7
0
 private void HandleSendCopyToDeliveryClick(object sender, ItemClickEventArgs e)
 {
     try
     {
         ddbCopy.HideDropDown();
         if (string.IsNullOrEmpty(txtCOD_DOCU.Text))
             throw new ArgumentException(_Message.MsgSelectDoc);
         if (lkeIND_ESTA.EditValue.ToString() != "AB")
             throw new ArgumentException(string.Format("{0}{1}.", _Message.MsgNotCopy, lkeIND_ESTA.Text.ToLower()));
         var odoc = new BEDocument()
         {
             COD_DOCU = Convert.ToInt32(txtCOD_DOCU.Text),
             IND_ESTA = lkeIND_ESTA.EditValue.ToString(),
             COD_SUCU = SESSION_COMP,
             IND_TIPO_COMP = rdgIND_TIPO_COMP.EditValue.ToString(),
             COD_SOCI_NEGO = Convert.ToInt32(bteCOD_SOCI_NEGO.Properties.Buttons[0].Caption),
             ALF_SOCI_NEGO = bteCOD_SOCI_NEGO.Text,
             ALF_NUM_RUCC = txtALF_NUM_RUCC.Text,
             ALF_DIRE_FISC = mmeALF_DIRE_FISC.Text.Trim(),
             ALF_DIRE_ENTR = mmeALF_DIRE_ENTR.Text.Trim(),
             COD_MONE = (int?)lkeCOD_MONE.EditValue,
             NUM_TIPO_CAMB = (decimal?)txtNUM_TIPO_CAMB.EditValue,
             COD_COND_PAGO = (int?)lkeCOD_COND_PAGO.EditValue,
             COD_ALMA = (int?)lkeCOD_ALMA.EditValue,
             FEC_REGI = (DateTime?)dteFEC_REGI.EditValue,
             FEC_ENTR = (DateTime?)dteFEC_ENTR.EditValue,
             FEC_DOCU = (DateTime?)dteFEC_DOCU.EditValue,
             FEC_PAGO = (DateTime?)dteFEC_PAGO.EditValue,
             ALF_COME = mmeALF_COME.Text.Trim(),
             NUM_SUBB_TOTA = Convert.ToDecimal(txtNUM_SUBB_TOTA.EditValue),
             NUM_DESC = Convert.ToDecimal(txtNUM_DESC.EditValue),
             NUM_IGVV = Convert.ToDecimal(txtNUM_IGVV.EditValue),
             NUM_TOTA = Convert.ToDecimal(txtNUM_TOTA.EditValue)
         };
         xfCreditNote.SgIns.docb = odoc;
         xfCreditNote.SgIns.MdiParent = MdiParent;
         xfCreditNote.SgIns.Activate();
         xfCreditNote.SgIns.FORM_SUBO = "bbiSupplierCreditNote";
         xfCreditNote.SgIns.Show();
         xfCreditNote.SgIns.BringToFront();
     }
     catch (Exception ex)
     {
         XtraMessageBox.Show(ex.Message,
             _Message.MsgInsCaption,
             MessageBoxButtons.OK,
             MessageBoxIcon.Error);
     }
 }
Example #8
0
        public void Set_Save()
        {
            MessageBoxIcon msgIcon = MessageBoxIcon.Warning;
            try
            {
                if (string.IsNullOrWhiteSpace(txtALF_NUM_SERI.Text))
                    throw new ArgumentException(_Message.MsgReqALF_NUM_SERI);
                if (string.IsNullOrWhiteSpace(txtALF_NUM_CORR.Text))
                    throw new ArgumentException(_Message.MsgReqALF_NUM_CORR);
                if (string.IsNullOrWhiteSpace(bteCOD_SOCI_NEGO.Properties.Buttons[0].Caption))
                    throw new ArgumentException(_Message.MsgReqCOD_SOCI_NEGO);

                var odoc = new BEDocument()
                {
                    COD_DOCU = (!string.IsNullOrWhiteSpace(txtCOD_DOCU.Text)) ? Convert.ToInt32(txtCOD_DOCU.Text) : (int?)null,
                    ALF_NUM_SERI = txtALF_NUM_SERI.Text.Trim(),
                    ALF_NUM_CORR = txtALF_NUM_CORR.Text.Trim(),
                    IND_ESTA = lkeIND_ESTA.EditValue.ToString(),
                    COD_SUCU = SESSION_COMP,
                    IND_TIPO_COMP = rdgIND_TIPO_COMP.EditValue.ToString(),
                    COD_SOCI_NEGO = Convert.ToInt32(bteCOD_SOCI_NEGO.Properties.Buttons[0].Caption),
                    ALF_SOCI_NEGO = bteCOD_SOCI_NEGO.Text,
                    ALF_NUM_RUCC = txtALF_NUM_RUCC.Text,
                    ALF_DIRE_FISC = mmeALF_DIRE_FISC.Text.Trim(),
                    ALF_DIRE_ENTR = mmeALF_DIRE_ENTR.Text.Trim(),
                    COD_MONE = (int?)lkeCOD_MONE.EditValue,
                    NUM_TIPO_CAMB = (decimal?)txtNUM_TIPO_CAMB.EditValue,
                    COD_COND_PAGO = (int?)lkeCOD_COND_PAGO.EditValue,
                    COD_ALMA = (int?)lkeCOD_ALMA.EditValue,
                    FEC_REGI = (DateTime?)dteFEC_REGI.EditValue,
                    FEC_ENTR = (DateTime?)dteFEC_ENTR.EditValue,
                    FEC_DOCU = (DateTime?)dteFEC_DOCU.EditValue,
                    FEC_PAGO = (DateTime?)dteFEC_PAGO.EditValue,
                    ALF_COME = mmeALF_COME.Text.Trim(),
                    NUM_SUBB_TOTA = Convert.ToDecimal(txtNUM_SUBB_TOTA.EditValue),
                    NUM_DESC = Convert.ToDecimal(txtNUM_DESC.EditValue),
                    NUM_IGVV = Convert.ToDecimal(txtNUM_IGVV.EditValue),
                    NUM_TOTA = Convert.ToDecimal(txtNUM_TOTA.EditValue),
                    COD_USUA_CREA = SESSION_USER,
                    COD_USUA_MODI = SESSION_USER,
                    IND_MNTN = (!string.IsNullOrWhiteSpace(txtCOD_DOCU.Text)) ? 2 : 1
                };

                var context = new ValidationContext(odoc, null, null);
                var errors = new List<ValidationResult>();
                if (!Validator.TryValidateObject(odoc, context, errors, true))
                {
                    foreach (ValidationResult result in errors)
                    {
                        msgIcon = MessageBoxIcon.Warning;
                        throw new ArgumentException(result.ErrorMessage);
                    }
                }

                gdvLines.CloseEditor();
                gdvLines.RefreshData();
                var lines = (List<BEDocumentLines>)gdvLines.DataSource;
                if (lines.Count == 0)
                {
                    msgIcon = MessageBoxIcon.Warning;
                    throw new ArgumentException(_Message.MsgManyRows);
                }

                var i = 1;
                lines.ForEach(item =>
                {
                    context = new ValidationContext(item, null, null);
                    errors = new List<ValidationResult>();
                    if (!Validator.TryValidateObject(item, context, errors, true))
                    {
                        foreach (ValidationResult result in errors)
                        {
                            msgIcon = MessageBoxIcon.Warning;
                            throw new ArgumentException(string.Format("{0}\nFila: {1}", result.ErrorMessage, i));
                        }
                    }
                    i++;
                });

                var obr = new BRPurchase();
                obr.Set_PSCP_SPMT_SCPC_OINV(odoc, lines);
                if (!string.IsNullOrWhiteSpace(odoc.MSG_MNTN))
                {
                    msgIcon = MessageBoxIcon.Error;
                    throw new ArgumentException(odoc.MSG_MNTN);
                }
                txtCOD_DOCU.Text = odoc.COD_DOCU.ToString();
                gdvLines.RefreshData();
                StateControls(true);
                xfDelivery.SgIns.lkeIND_ESTA.EditValue = "CE";
                XtraMessageBox.Show(_Message.MsgSuccessfully, _Message.MsgInsCaption,
                                    MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message,
                                    _Message.MsgInsCaption,
                                    MessageBoxButtons.OK,
                                    msgIcon);
            }
        }
Example #9
0
        public void Set_Export()
        {
            try
            {
                if (string.IsNullOrWhiteSpace(txtCOD_ORCO.Text))
                    throw new ArgumentException(_Message.MsgSelectOC);
                var oc = new xrPurchaseOrder();
                var odoc = new BEDocument()
                {
                    ALF_DOCU_REFE = txtALF_DOCU_REFE.Text.Trim(),
                    ALF_SOCI_NEGO = bteCOD_SOCI_NEGO.Text,
                    ALF_DIRE_ENTR = mmeALF_DIRE_ENTR.Text.Trim(),
                    ALF_COND_PAGO = lkeCOD_COND_PAGO.Text,
                    FEC_REGI = (DateTime?)dteFEC_REGI.EditValue,
                    ALF_COME = mmeALF_COME.Text,
                    NUM_SUBB_TOTA = Convert.ToDecimal(txtNUM_SUBB_TOTA.EditValue),
                    NUM_DESC = Convert.ToDecimal(txtNUM_DESC.EditValue),
                    NUM_IGVV = Convert.ToDecimal(txtNUM_IGVV.EditValue),
                    NUM_TOTA = Convert.ToDecimal(txtNUM_TOTA.EditValue)
                };

                oc.bdsDocument.DataSource = odoc;
                oc.bdsDocumentLines.DataSource = (List<BEDocumentLines>)gdvLines.DataSource;

                var SIMB = (BESVMC_MONE)lkeCOD_MONE.GetSelectedDataRow();
                var tfs = (SIMB.ALF_MONE_SIMB == "USD") ? "{0:USD 0.00}" : "{0:c2}";
                oc.lblNUM_SUBB_TOTA.DataBindings["Text"].FormatString = tfs;
                oc.lblNUM_DESC.DataBindings["Text"].FormatString = tfs;
                oc.lblNUM_IGVV.DataBindings["Text"].FormatString = tfs;
                oc.lblNUM_TOTA.DataBindings["Text"].FormatString = tfs;

                oc.tlcNUM_PREC_UNIT.DataBindings["Text"].FormatString = tfs;
                oc.tlcNUM_DESC.DataBindings["Text"].FormatString = tfs;
                oc.tlcNUM_PREC_DESC.DataBindings["Text"].FormatString = tfs;
                oc.tlcNUM_IMPO.DataBindings["Text"].FormatString = tfs;
                using (var printTool = new ReportPrintTool(oc))
                {
                    printTool.ShowPreviewDialog();
                }
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message,
                                    _Message.MsgInsCaption,
                                    MessageBoxButtons.OK,
                                    MessageBoxIcon.Error);
            }
        }
Example #10
0
        private void Search()
        {
            try
            {
                var opar = new BEDocument();
                opar.ALF_SOCI_NEGO = txtALF_SOCI_NEGO.Text.Trim();
                opar.FEC_REGI_INIC = (DateTime?)dteFEC_REGI_INIC.EditValue;
                opar.FEC_REGI_FINA = (DateTime?)dteFEC_REGI_FINA.EditValue;
                opar.ALF_DOCU_REFE = txtALF_DOCU_REFE.Text;
                opar.IND_ESTA = (lkeIND_ESTA.EditValue != null) ? lkeIND_ESTA.EditValue.ToString() : null;
                opar.COD_SUCU = SESSION_COMP;

                var obr = new BRPurchase();
                var olst = obr.Get_PSCP_SPLS_SCPC_GUIA(opar);

                gdcSearch.DataSource = olst;
                gdvSearch.MoveFirst();
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message, _Message.MsgInsCaption,
                                    MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Example #11
0
        private void Get_Search()
        {
            try
            {
                if (string.IsNullOrWhiteSpace(dteFEC_DESD.Text))
                    throw new ArgumentException("Fecha inicial incorrecta.");
                if (string.IsNullOrWhiteSpace(dteFEC_HAST.Text))
                    throw new ArgumentException("Fecha final incorrecta");
                if (DateTime.Compare(dteFEC_DESD.DateTime, dteFEC_HAST.DateTime) > 0)
                    throw new ArgumentException("Rango de fechas incorrecto.");

                var obj = new BEDocument() { FEC_REGI_INIC = dteFEC_DESD.DateTime, FEC_REGI_FINA = dteFEC_HAST.DateTime, COD_SUCU = SESSION_COMP };

                var obr = new BRReportPurchase();
                var olst = obr.Get_PPRP_SPLS_COM4(obj);

                gdcReport.DataSource = olst;
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message, _Message.MsgInsCaption,
                    MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Example #12
0
 /// <summary>
 /// Retorna las guías de compra según filtro.
 /// </summary>
 public IDataReader Get_PSCP_SPLS_SCPC_GUIA(BEDocument obj)
 {
     try
     {
         if (ocn.State == ConnectionState.Closed) ocn.Open();
         var ocmd = odb.GetStoredProcCommand("PSCP_SPLS_SCPC_GUIA", obj.ALF_SOCI_NEGO,
                                                                    obj.ALF_DOCU_REFE,
                                                                    obj.FEC_REGI_INIC,
                                                                    obj.FEC_REGI_FINA,
                                                                    obj.IND_ESTA,
                                                                    obj.COD_SUCU);
         ocmd.CommandTimeout = 2000;
         var odr = odb.ExecuteReader(ocmd);
         Dispose(false);
         return (odr);
     }
     finally
     {
         ocn.Close();
     }
 }
Example #13
0
        //! NOTA DE CREDITO PROVEEDOR
        /// <summary>
        /// Mantenimiento de nota de crédito proveedor.
        /// Inserta, Modifica
        /// </summary>
        public void Set_PSCP_SPMT_SCPC_ORPC(BEDocument odoc, List<BEDocumentLines> lines)
        {
            if (ocn.State == ConnectionState.Closed) ocn.Open();
            using (var obts = ocn.BeginTransaction())
            {
                try
                {
                    using (var ocmd = odb.GetStoredProcCommand("PSCP_SPMT_SCPC_ORPC", odoc.COD_DOCU,
                                                                                      odoc.ALF_NUM_SERI,
                                                                                      odoc.ALF_NUM_CORR,
                                                                                      odoc.IND_ESTA,
                                                                                      odoc.COD_SUCU,
                                                                                      odoc.IND_TIPO_COMP,
                                                                                      odoc.COD_SOCI_NEGO,
                                                                                      odoc.ALF_SOCI_NEGO,
                                                                                      odoc.ALF_NUM_RUCC,
                                                                                      odoc.ALF_CONT,
                                                                                      odoc.ALF_DIRE_FISC,
                                                                                      odoc.ALF_DIRE_ENTR,
                                                                                      odoc.COD_MONE,
                                                                                      odoc.NUM_TIPO_CAMB,
                                                                                      odoc.COD_COND_PAGO,
                                                                                      odoc.COD_ALMA,
                                                                                      odoc.FEC_REGI,
                                                                                      odoc.FEC_ENTR,
                                                                                      odoc.FEC_DOCU,
                                                                                      odoc.FEC_PAGO,
                                                                                      odoc.ALF_COME,
                                                                                      odoc.NUM_SUBB_TOTA,
                                                                                      odoc.NUM_DESC,
                                                                                      odoc.NUM_IGVV,
                                                                                      odoc.NUM_ISCC,
                                                                                      odoc.NUM_TOTA,
                                                                                      odoc.COD_USUA_CREA,
                                                                                      odoc.COD_USUA_MODI,
                                                                                      odoc.IND_MNTN))
                    {
                        ocmd.CommandTimeout = 2000;
                        odb.ExecuteNonQuery(ocmd, obts);
                        odoc.COD_DOCU = Convert.ToInt32(odb.GetParameterValue(ocmd, "@COD_DOCU"));

                        DbCommand cmdo;
                        var index = 1;
                        lines.ForEach(line =>
                        {
                            line.COD_DOCU = odoc.COD_DOCU;
                            line.NUM_LINE = index;
                            cmdo = odb.GetStoredProcCommand("PSCP_SPMT_SCPD_ORPC", line.COD_DOCU,
                                                                                   line.TIP_DOCU_BASE,
                                                                                   line.COD_DOCU_BASE,
                                                                                   line.NUM_LINE_BASE,
                                                                                   line.COD_ARTI_BASE,
                                                                                   line.NUM_LINE,
                                                                                   line.COD_ARTI,
                                                                                   line.ALF_ARTI,
                                                                                   line.NUM_CANT,
                                                                                   line.NUM_CANT_ABIE,
                                                                                   line.NUM_PREC_UNIT_ORIG,
                                                                                   line.NUM_PREC_UNIT,
                                                                                   line.NUM_PORC_DESC,
                                                                                   line.NUM_DESC,
                                                                                   line.NUM_PREC_DESC,
                                                                                   line.NUM_IMPO,
                                                                                   odoc.COD_USUA_MODI);
                            cmdo.CommandTimeout = 2000;
                            odb.ExecuteNonQuery(cmdo, obts);
                            index += 1;
                        });

                        obts.Commit();
                    }
                }
                catch (Exception ex)
                {
                    obts.Rollback();
                    odoc.MSG_MNTN = ex.Message;
                }
                finally
                {
                    ocn.Close();
                }
            }
        }
Example #14
0
 //! NOTA DE CREDITO PROVEEDOR
 /// <summary>
 /// Mantenimiento de notas de crédito proveedor.
 /// Inserta, Modifica
 /// </summary>
 public void Set_PSCP_SPMT_SCPC_ORPC(BEDocument odoc, List<BEDocumentLines> lines)
 {
     oda.Set_PSCP_SPMT_SCPC_ORPC(odoc, lines);
     Dispose(false);
 }
Example #15
0
 //! GUIA DE COMPRA
 /// <summary>
 /// Mantenimiento de guías de compra.
 /// Inserta, Modifica
 /// </summary>
 public void Set_PSCP_SPMT_SCPC_GUIA(BEDocument odoc, List<BEDocumentLines> lines, List<BEDocumentExpenses> expenses)
 {
     oda.Set_PSCP_SPMT_SCPC_GUIA(odoc, lines, expenses);
     Dispose(false);
 }
Example #16
0
 private void sbtExpen_Click(object sender, EventArgs e)
 {
     var obj = new BEDocument() { COD_DOCU = (string.IsNullOrWhiteSpace(txtCOD_DOCU.Text)) ? (int?)null : Convert.ToInt32(txtCOD_DOCU.Text) };
     var obr = new BRPurchase();
     var olgn1 = obr.Get_PSCP_SPLS_SCPC_GANA(obj);
     if (olgn1.Count > 0) olgn = olgn1;
     var oxf = new xfExpNationalization() { olgn = olgn, SESSION_COMP = SESSION_COMP };
     if (oxf.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         olgn = oxf.olgn;
 }