private void updateAccountPayment() { try { CashAccountReceivableDetailTable record = new CashAccountReceivableDetailTable(); record.customerOrSupplierID = getExchangesUnitID(); record.billTypeName = PAYMENT_ORDER_BILL_NAME; record.billNumber = m_billNumber; record.tradingDate = DateTime.Now.ToString("yyyyMMdd"); record.turnover = Convert.ToDouble(this.textBoxTransactionAmount.Text); record.staffID = DbPublic.getInctance().getCurrentLoginUserID(); CashAccountPayableDetail.getInctance().insert(record); } catch (Exception) { } }
private void updateDataGridView() { SortedDictionary <int, CashAccountReceivableDetailTable> dateList = new SortedDictionary <int, CashAccountReceivableDetailTable>(); if (m_isAccountReceivable) { dateList = CashAccountReceivableDetail.getInctance().getAccountReceivableDetailFromCustomerID(m_customerOrSupplierID); } else { dateList = CashAccountPayableDetail.getInctance().getAccountPayableDetailFromSupplierID(m_customerOrSupplierID); } m_dataGridRecordCount = dateList.Count; SortedDictionary <int, ArrayList> sortedDictionaryList = new SortedDictionary <int, ArrayList>(); int recordCount = 0; for (recordCount = 0; recordCount < dateList.Count; recordCount++) { CashAccountReceivableDetailTable record = new CashAccountReceivableDetailTable(); record = (CashAccountReceivableDetailTable)dateList[recordCount]; ArrayList temp = new ArrayList(); temp.Add(record.pkey); temp.Add(record.name); temp.Add(record.billTypeName); temp.Add(record.turnover); temp.Add(record.balance); temp.Add(record.tradingDate); temp.Add(record.billNumber); temp.Add(record.staffName); temp.Add(record.note); sortedDictionaryList.Add(recordCount, temp); } m_dateGridViewExtend.initDataGridViewData(sortedDictionaryList, 2); }