Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            VerifySession();
            String idSupplier = Request["idSupplier"];
            InvoiceSupplierManager          invoiceSupplierManager          = new InvoiceSupplierManager();
            InvoiceReceivingSupplierManager invoiceReceivingSupplierManager = new InvoiceReceivingSupplierManager();

            invoiceSupplier(invoiceSupplierManager.LoadInvoiceSupplier(idSupplier), invoiceReceivingSupplierManager.LoadSupplier(idSupplier));
        }
Beispiel #2
0
        private void invoiceSupplier(List <DOM.InvoiceSupplier> invoiceSupplier)
        {
            DataTable tblInvoiceSupplier = new DataTable();
            InvoiceReceivingSupplierManager invoiceReceivingSuppliertManager = new InvoiceReceivingSupplierManager();

            lblBillSupplier.Text = "Facturas de Proveedores";

            tblInvoiceSupplier.Columns.Add("Número de Factura");
            tblInvoiceSupplier.Columns.Add("Nombre");
            tblInvoiceSupplier.Columns.Add("identificacion");
            tblInvoiceSupplier.Columns.Add("Monto");
            tblInvoiceSupplier.Columns.Add("Estado");
            tblInvoiceSupplier.Columns.Add("Id Método pago");
            tblInvoiceSupplier.Columns.Add("MétodoPago");
            tblInvoiceSupplier.Columns.Add("Fecha Recordatorio");
            tblInvoiceSupplier.Columns.Add("Fecha Pago");

            foreach (DOM.InvoiceSupplier invoice in invoiceSupplier)
            {
                string condition = invoice.condition.ToString();
                if (condition == "0")
                {
                    condition = "No pagado";
                }
                else
                {
                    condition = "Pagado";
                }

                string payMethod = invoice.payMethod.ToString();
                if (payMethod == "")
                {
                    payMethod = "-";
                }
                InvoiceReceivingSupplier invoiceReceiving = invoiceReceivingSuppliertManager.LoadSupplier(invoice.idSupplier);



                tblInvoiceSupplier.Rows.Add(invoice.numberInvoice.ToString(), invoiceReceiving.nameSupplier, invoice.idSupplier, invoice.money.ToString(), condition, invoice.idPayMethod.ToString().Replace("0", "-"), payMethod, invoice.reminderDate.ToString("dd/MM/yyyy"), invoice.paymentDate.ToString("dd/MM/yyyy").Replace("01/01/1900", "-"));
            }

            gdInvoiceSupplier.DataSource = tblInvoiceSupplier;
            gdInvoiceSupplier.DataBind();
        }