コード例 #1
0
 public ReportViewInvoice(int id)
 {
     InitializeComponent();
     DataAccess da = new DataAccess();
     InvoiceId = id;
     Outgo = da.InvoiceGet(id);
 }
コード例 #2
0
 public SpareOutgoEditView(invoice _inv)
 {
     da = new DataAccess();
     InitializeComponent();
     edtNumber.Text = da.SpareOutgoGetMaxId().ToString();
     Invoice = da.InvoiceGet(_inv.id);
 }
コード例 #3
0
 private void LoadInvoices()
 {
     da = new DataAccess();
     List<invoice> list = da.InvoiceGet();
     foreach (invoice s in list)
     {
         if (s.InvoiceDate != null)
         {
             string strDate = "";
             strDate += s.InvoiceDate.Value.Year + ".";
             if (s.InvoiceDate.Value.Month < 10)
                 strDate += "0";
             strDate += s.InvoiceDate.Value.Month + ".";
             if (s.InvoiceDate.Value.Day < 10)
                 strDate += "0";
             strDate += s.InvoiceDate.Value.Day;
             s.DateString = strDate;
         }
     }
     dgInvoices.DataContext = list.OrderByDescending(s => s.InvoiceDate);
 }