void ReleaseDesignerOutlets()
        {
            if (LblDate != null)
            {
                LblDate.Dispose();
                LblDate = null;
            }

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

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

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

            if (LblVenue != null)
            {
                LblVenue.Dispose();
                LblVenue = null;
            }
        }
Пример #2
0
        void ReleaseDesignerOutlets()
        {
            if (LblDate != null)
            {
                LblDate.Dispose();
                LblDate = null;
            }

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

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

            if (BtnDateTime != null)
            {
                BtnDateTime.Dispose();
                BtnDateTime = null;
            }
        }
Пример #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string key    = "clientScript";
            string script = "document.getElementById('LblDate').textContent = new Date();";

            ClientScript.RegisterStartupScript(LblDate.GetType(), key, script, true);
        }
Пример #4
0
        /// <summary>
        /// When the client select the rating that wants to edit the not necessarily labels, tetxboxes and comboboxes are hiding
        /// from the form and then the neccesarily labels, tetxboxes and comboboxes are pop up. Then fills all the fields with
        /// the data of the selected rating.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BtnSelect_Click(object sender, EventArgs e)
        {
            LblBusiness.Show();
            LblDate.Show();
            LblPerson.Show();
            LblUsername.Show();
            CmbBusiness.Show();
            CmbUsername.Show();
            BtnEdit.Show();
            TbxPerson.Show();
            DtpDate.Show();

            LblSelect.Hide();
            CmbSelect.Hide();
            BtnSelect.Hide();

            SelectedData   = DCom.GetData(String.Format(SqlExec, CmbSelect.SelectedValue));
            TbxPerson.Text = SelectedData.Rows[0]["Persons"].ToString();

            CmbBusiness.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");
            CmbBusiness.DisplayMember = "NAME";
            CmbBusiness.ValueMember   = "ID";

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

            CmbUsername.Text = SelectedData.Rows[0]["User"].ToString();
            CmbBusiness.Text = SelectedData.Rows[0]["BusinessID"].ToString();
        }
Пример #5
0
        void ReleaseDesignerOutlets()
        {
            if (LblTitle != null)
            {
                LblTitle.Dispose();
                LblTitle = null;
            }

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

            if (LblPreview != null)
            {
                LblPreview.Dispose();
                LblPreview = null;
            }
        }
Пример #6
0
        /// <summary>
        /// In forms constructor the not necessarily labels and tetxboxes are hiding
        /// from the form. Then the combobox for ratings(CmbSelect) is filling
        /// from the rating(rating) table.
        /// </summary>
        public EditReservationForm()
        {
            InitializeComponent();

            LblBusiness.Hide();
            LblDate.Hide();
            LblPerson.Hide();
            LblUsername.Hide();

            CmbBusiness.Hide();
            CmbUsername.Hide();

            BtnEdit.Hide();

            TbxPerson.Hide();
            DtpDate.Hide();

            CmbSelect.DataSource    = DCom.GetData("SELECT *, CONCAT(Username, ', ', Rating_Value) AS NAME FROM ratings");
            CmbSelect.DisplayMember = "NAME";
            CmbSelect.ValueMember   = "ID";
        }