Esempio n. 1
0
 public void CreateProfileForm(Customer cust)
 {
     if (profileForm == null || profileForm.profileFormClosed)
     {
         profileForm               = new ProfileForm(cust);
         profileForm.MdiParent     = this;
         profileForm.StartPosition = FormStartPosition.CenterScreen;
         profileForm.Show();
     }
     else
     {
         profileForm.PopulateForm(cust);
     }
 }
Esempio n. 2
0
 public void PopulateForm(Customer cust, Order order, bool newOrder, ProfileForm profileForm)
 {
     this.cust        = cust;
     this.order       = order;
     this.newOrder    = newOrder;
     this.profileForm = profileForm;
     displayNewButtons(newOrder);
     OrderNumLabel.Text    = Convert.ToString(order.OrderNum);
     DateLabel.Text        = DateTime.Now.ToString("yyyy/MM/dd");
     CustNumLabel.Text     = Convert.ToString(cust.CustomerNum);
     CustNameLabel.Text    = cust.Name;
     CustAddressLabel.Text = cust.Address;
     CustPhoneLabel.Text   = cust.PhoneNum;
     if (newOrder)
     {
         AddOrderToDB();
     }
 }
Esempio n. 3
0
 public OrderForm(Customer customer, Order order, bool newOrder, ProfileForm profileForm)
 {
     InitializeComponent();
     PopulateForm(customer, order, newOrder, profileForm);
 }