コード例 #1
0
ファイル: MainForm.cs プロジェクト: ProfJJet/INF2011S-Project
 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);
     }
 }
コード例 #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();
     }
 }
コード例 #3
0
 public OrderForm(Customer customer, Order order, bool newOrder, ProfileForm profileForm)
 {
     InitializeComponent();
     PopulateForm(customer, order, newOrder, profileForm);
 }