Example #1
0
        private void BtnSelect_Click(object sender, EventArgs e)
        {
            LblBusinessDescription.Show();
            LblBusinessName.Show();
            LblCategory.Show();
            LblPrice.Show();
            LblRating.Show();
            LblTelephone.Show();
            LblUser.Show();
            LblWebsite.Show();
            LblWorkHours.Show();
            LblBusinessType.Show();
            LblLocation.Show();

            TbxBusinessName.Show();
            TbxCategory.Show();
            TbxDescription.Show();
            TbxPrice.Show();
            TbxRating.Show();
            TbxTelephone.Show();
            TbxWebsite.Show();

            CmbLocation.Show();
            CmbTypes.Show();
            CmbUser.Show();
            CmbWorkHours.Show();

            ChbReservation.Show();

            BtnEdit.Show();

            LblSelect.Hide();
            CmbBusinesses.Hide();
            BtnSelect.Hide();

            SelectedData         = DCom.GetData(String.Format(SqlExec, CmbBusinesses.SelectedValue));
            TbxBusinessName.Text = (string)SelectedData.Rows[0]["Business_Name"];
            TbxCategory.Text     = (string)SelectedData.Rows[0]["Category"];
            TbxDescription.Text  = (string)SelectedData.Rows[0]["Description"];
            TbxPrice.Text        = SelectedData.Rows[0]["Price_Range"].ToString();
            TbxRating.Text       = (string)SelectedData.Rows[0]["Rating"].ToString();
            TbxTelephone.Text    = (string)SelectedData.Rows[0]["Telephone"];
            TbxWebsite.Text      = (string)SelectedData.Rows[0]["Website"];

            CmbLocation.DataSource    = DCom.GetData("SELECT ID,CONCAT(Address_Name, ', ', Address_Number) AS NAME FROM location");
            CmbLocation.DisplayMember = "NAME";
            CmbLocation.ValueMember   = "ID";

            CmbTypes.DataSource    = DCom.GetData("SELECT * FROM businesses_types");
            CmbTypes.DisplayMember = "Type";
            CmbTypes.ValueMember   = "Type";

            CmbUser.DataSource    = DCom.GetData("SELECT * FROM users");
            CmbUser.DisplayMember = "Username";
            CmbUser.ValueMember   = "Username";

            CmbWorkHours.DataSource    = DCom.GetData("SELECT * FROM work_hours");
            CmbWorkHours.DisplayMember = "ID";
            CmbWorkHours.ValueMember   = "ID";
        }
Example #2
0
        public EdiBusinessForm()
        {
            InitializeComponent();

            LblBusinessDescription.Hide();
            LblBusinessName.Hide();
            LblCategory.Hide();
            LblPrice.Hide();
            LblRating.Hide();
            LblTelephone.Hide();
            LblUser.Hide();
            LblWebsite.Hide();
            LblWorkHours.Hide();
            LblBusinessType.Hide();
            LblLocation.Hide();

            TbxBusinessName.Hide();
            TbxCategory.Hide();
            TbxDescription.Hide();
            TbxPrice.Hide();
            TbxRating.Hide();
            TbxTelephone.Hide();
            TbxWebsite.Hide();

            CmbLocation.Hide();
            CmbTypes.Hide();
            CmbUser.Hide();
            CmbWorkHours.Hide();

            ChbReservation.Hide();

            BtnEdit.Hide();

            CmbBusinesses.DataSource    = DCom.GetData("SELECT businesses.ID, CONCAT(businesses.Business_Name, ', ', location.Address_Name, ', ', location.Municipality) AS NAME FROM businesses, location WHERE businesses.Location_ID = location.ID");
            CmbBusinesses.DisplayMember = "NAME";
            CmbBusinesses.ValueMember   = "ID";
        }
        void ReleaseDesignerOutlets()
        {
            if (BackButton != null)
            {
                BackButton.Dispose();
                BackButton = null;
            }

            if (DetailsCover != null)
            {
                DetailsCover.Dispose();
                DetailsCover = null;
            }

            if (DetailsDescription != null)
            {
                DetailsDescription.Dispose();
                DetailsDescription = null;
            }

            if (DetailsMainTitleCell != null)
            {
                DetailsMainTitleCell.Dispose();
                DetailsMainTitleCell = null;
            }

            if (DetailsNavReminderBtn != null)
            {
                DetailsNavReminderBtn.Dispose();
                DetailsNavReminderBtn = null;
            }

            if (DetailsNavTitleLbl != null)
            {
                DetailsNavTitleLbl.Dispose();
                DetailsNavTitleLbl = null;
            }

            if (DetailsOrderCell != null)
            {
                DetailsOrderCell.Dispose();
                DetailsOrderCell = null;
            }

            if (DetailsPlatform != null)
            {
                DetailsPlatform.Dispose();
                DetailsPlatform = null;
            }

            if (DetailsRating != null)
            {
                DetailsRating.Dispose();
                DetailsRating = null;
            }

            if (DetailsRatingImage != null)
            {
                DetailsRatingImage.Dispose();
                DetailsRatingImage = null;
            }

            if (DetailsRelease != null)
            {
                DetailsRelease.Dispose();
                DetailsRelease = null;
            }

            if (DetailsReminderBtn != null)
            {
                DetailsReminderBtn.Dispose();
                DetailsReminderBtn = null;
            }

            if (DetailsScreenshots != null)
            {
                DetailsScreenshots.Dispose();
                DetailsScreenshots = null;
            }

            if (DetailsShowSocialNetworkViewBtn != null)
            {
                DetailsShowSocialNetworkViewBtn.Dispose();
                DetailsShowSocialNetworkViewBtn = null;
            }

            if (DetailsSocialNetworkCloseBtn != null)
            {
                DetailsSocialNetworkCloseBtn.Dispose();
                DetailsSocialNetworkCloseBtn = null;
            }

            if (DetailsSocialNetworkView != null)
            {
                DetailsSocialNetworkView.Dispose();
                DetailsSocialNetworkView = null;
            }

            if (DetailsSpinner != null)
            {
                DetailsSpinner.Dispose();
                DetailsSpinner = null;
            }

            if (DetailsTitle != null)
            {
                DetailsTitle.Dispose();
                DetailsTitle = null;
            }

            if (DetailsTopView != null)
            {
                DetailsTopView.Dispose();
                DetailsTopView = null;
            }

            if (DetailsTrailerCell != null)
            {
                DetailsTrailerCell.Dispose();
                DetailsTrailerCell = null;
            }

            if (DetailsWebsiteCell != null)
            {
                DetailsWebsiteCell.Dispose();
                DetailsWebsiteCell = null;
            }

            if (ImgVwBackground != null)
            {
                ImgVwBackground.Dispose();
                ImgVwBackground = null;
            }

            if (LblMainGame != null)
            {
                LblMainGame.Dispose();
                LblMainGame = null;
            }

            if (LblOrder != null)
            {
                LblOrder.Dispose();
                LblOrder = null;
            }

            if (LblTrailer != null)
            {
                LblTrailer.Dispose();
                LblTrailer = null;
            }

            if (LblWebsite != null)
            {
                LblWebsite.Dispose();
                LblWebsite = null;
            }

            if (NoScreenshotLabel != null)
            {
                NoScreenshotLabel.Dispose();
                NoScreenshotLabel = null;
            }

            if (PostBtn != null)
            {
                PostBtn.Dispose();
                PostBtn = null;
            }

            if (ScreenshotBtn1 != null)
            {
                ScreenshotBtn1.Dispose();
                ScreenshotBtn1 = null;
            }

            if (ScreenshotBtn2 != null)
            {
                ScreenshotBtn2.Dispose();
                ScreenshotBtn2 = null;
            }

            if (ScreenshotBtn3 != null)
            {
                ScreenshotBtn3.Dispose();
                ScreenshotBtn3 = null;
            }

            if (ScreenshotBtn4 != null)
            {
                ScreenshotBtn4.Dispose();
                ScreenshotBtn4 = null;
            }

            if (ScreenshotBtn5 != null)
            {
                ScreenshotBtn5.Dispose();
                ScreenshotBtn5 = null;
            }

            if (SocialNetworkCell != null)
            {
                SocialNetworkCell.Dispose();
                SocialNetworkCell = null;
            }

            if (TweetBtn != null)
            {
                TweetBtn.Dispose();
                TweetBtn = null;
            }

            if (ImgVwBackgroundOverlay != null)
            {
                ImgVwBackgroundOverlay.Dispose();
                ImgVwBackgroundOverlay = null;
            }
        }