예제 #1
0
        private void ViewCompanyInfo()
        {
            Restaurant oRestaurant = RestaurantDA.GetRestaurantInfo();

            lblCompanyName.Text = oRestaurant.RestaurantName;
            lblAddress.Text     = oRestaurant.Address;
            lblCity.Text        = oRestaurant.City;
            lblState.Text       = oRestaurant.State;
            lblZip.Text         = oRestaurant.Zip;
        }
예제 #2
0
        public frmMain()
        {
            InitializeComponent();
            //SectionDA.AddStaticSections();
            //RestaurantDA.DeleteRestaurant();
            //SectionDA.DeleteSectionAssignments();
            //DeleteSectionAssignments();
            Restaurant oRestaurant = RestaurantDA.GetRestaurantInfo();

            if (oRestaurant.RestaurantID != 0)
            {
                //restaurant has been set
                CurrentRestaurant();
                mnuAbout.Text = "About " + oRestaurant.RestaurantName;
            }
            else
            {
                //if you want to force a delete of restraunt call RestaurantDA.DeleteRestaurant();
                //restaurant hasnt been set
                NoCurrentRestaurant();
            }
        }