コード例 #1
0
        /// <summary>
        /// Get all invoices and put them in the datagrid
        /// </summary>
        private void FillInvoiceDataGrid()
        {
            try
            {
                int iRet = 0;
                ds = db.ExecuteSQLStatement(sql.SelectAllInvoices(), ref iRet);

                dgInvoices.ItemsSource = new DataView(ds.Tables[0]);
            }
            catch (Exception ex)
            {
                throw new Exception(MethodInfo.GetCurrentMethod().DeclaringType.Name + "." + MethodInfo.GetCurrentMethod().Name + " -> " + ex.Message);
            }
        }
コード例 #2
0
        /// <summary>
        /// Internal method for loading drop-down menu for editing an existing invoice.
        /// </summary>
        private void LoadInvoiceComBx()
        {
            try
            {
                int iRet = 0;
                ds = db.ExecuteSQLStatement(sql.SelectAllInvoices(), ref iRet);

                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    InvoiceNumberComBx.Items.Add(ds.Tables[0].Rows[i][0].ToString());
                }
            }
            catch (Exception ex)
            {
                throw new Exception(MethodInfo.GetCurrentMethod().DeclaringType.Name + "." + MethodInfo.GetCurrentMethod().Name + " -> " + ex.Message);
            }
        }