Пример #1
0
 private void SetInvoiceStateControls(ProductWithInvoice result)
 {
     lblPrinted.ForeColor              = result.Printed() ? AppAppearance.GreenForeColor : AppAppearance.RedForeColor;
     lblCompleted.ForeColor            = result.Completed() ? AppAppearance.GreenForeColor : AppAppearance.RedForeColor;
     lblPrinted.Text                   = result.Printed() ? StringResource.Yes : StringResource.No;
     lblCompleted.Text                 = result.Completed() ? StringResource.Yes : StringResource.No;
     lblTotalQty.Text                  = result.InvoiceLines.Sum(p => p.Miktar).ToString();
     grdControlInvoiceLines.DataSource = result.InvoiceLines;
     grdViewInvoiceLines.BestFitColumns();
 }
Пример #2
0
        private void SaveCollectResult(InvoiceLine collectedLine, ProductWithInvoice result)
        {
            if (collectedLine == null)
            {
                return;
            }

            using (var db = new Db(true))
            {
                db.SaveCollectHeaderAndDetail(result.InvoiceHeader.AlisverisID, result.Completed(), collectedLine.IslemID, collectedLine.ToplananMiktar);
                db.Commit();
            }
        }