/// <summary>
        /// Initialize
        /// </summary>
        private void Initialize()
        {
            m_productList = new ProductList();
            m_items       = new List <InvoiceItem>();
            m_border      = new Border();
            m_billInfo    = new BillingInformation();

            ////Load price list from XML document
            //m_productList.LoadFromXml();

            //Set Billing information
            this.Name.Text = m_billInfo.Name = "Fran Wilson";
            //  this.BillingAddress.Text = m_billInfo.Address = "89, Chiaroscuro Road, Portland, 97219.";
            this.DueDate.Text       = (m_billInfo.Date = DateTime.Now.Date).ToString("d");
            this.InvoiceNumber.Text = m_billInfo.InvoiceNumber = new Random().Next(100, 10000).ToString();
            this.DueDate.Text       = (m_billInfo.DueDate = DateTime.Now.Date).ToString("d");

            //InvoiceItem defaultItem = new InvoiceItem() { Descripcion = m_productList[0].Name, Quantity = 1, Rate = m_productList[0].Rate };
            //defaultItem.Iva = m_productList[0].Rate * 0.07;

            //Add an item by default
            //AddItem(defaultItem, false);
        }
Esempio n. 2
0
 public AddressDialog(BillingInformation billInfo)
 {
     InitializeComponent();
     info             = billInfo;
     this.DataContext = info;
 }