示例#1
0
        /// <summary>
        /// Finally when the client made the changes that he wants the program checks if all the fields
        /// all fields are fill. If all fields are fill then the program exec the apropriate querry for the
        /// update of the rating, else show a error message.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BtnSelect_Click(object sender, EventArgs e)
        {
            LblRatingValue.Show();
            LblComment.Show();
            LblUsername.Show();

            TbxComment.Show();
            TbxRatingValue.Show();
            CmbUsername.Show();

            BtnEdit.Show();

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


            SelectedData        = DCom.GetData(String.Format(SqlExec, CmbSelect.SelectedValue));
            TbxRatingValue.Text = SelectedData.Rows[0]["Rating_Value"].ToString();
            TbxComment.Text     = SelectedData.Rows[0]["Comment"].ToString();

            CmbUsername.DataSource    = DCom.GetData("SELECT * FROM users");
            CmbUsername.DisplayMember = "Username";
            CmbUsername.ValueMember   = "Username";
        }
示例#2
0
        /// <summary>
        /// When the client select the user 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 user.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BtnSelect_Click(object sender, EventArgs e)
        {
            label2.Show();
            label3.Show();
            label4.Show();
            label5.Show();
            label6.Show();
            label7.Show();
            TbxAddressNumber.Show();
            TbxAdressName.Show();
            TbxLat.Show();
            TbxLong.Show();
            TbxPostalCode.Show();
            CmbMunicipality.Show();
            BtnEdit.Show();

            label1.Hide();
            CmbLocation.Hide();
            BtnSelect.Hide();

            SelectedData          = DCom.GetData(String.Format(SqlExec, CmbLocation.SelectedValue));
            TbxAdressName.Text    = SelectedData.Rows[0]["Address_Name"].ToString();
            TbxAddressNumber.Text = SelectedData.Rows[0]["Address_Number"].ToString();
            TbxLat.Text           = SelectedData.Rows[0]["Lat"].ToString();
            TbxLong.Text          = SelectedData.Rows[0]["Long"].ToString();
            TbxPostalCode.Text    = SelectedData.Rows[0]["Postal_Code"].ToString();

            CmbMunicipality.DataSource    = DCom.GetData("SELECT * FROM municipality");
            CmbMunicipality.DisplayMember = "Municipality_Name";
            CmbMunicipality.ValueMember   = "Municipality_Name";
            CmbMunicipality.Text          = SelectedData.Rows[0]["Municipality"].ToString();
        }
示例#3
0
        /// <summary>
        /// When the client select the user 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 user.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BtnSelect_Click(object sender, EventArgs e)
        {
            Guidelbl.Hide();
            CmbUser.Hide();
            BtnSelect.Hide();
            label1.Show();
            label2.Show();
            label3.Show();
            label4.Show();
            label5.Show();
            label6.Show();
            TbxFirstName.Show();
            TbxLastName.Show();
            TbxUsername.Show();
            TbxTelephone.Show();
            TbxEmail.Show();
            CmbTypes.Show();
            BtnEdit.Show();

            SelectedData      = DCom.GetData(String.Format(SqlExec, CmbUser.SelectedValue));
            TbxFirstName.Text = (string)SelectedData.Rows[0]["First_Name"];
            TbxLastName.Text  = (string)SelectedData.Rows[0]["Last_Name"];
            TbxUsername.Text  = (string)SelectedData.Rows[0]["Username"];
            TbxEmail.Text     = (string)SelectedData.Rows[0]["Email"];
            TbxTelephone.Text = (string)SelectedData.Rows[0]["Telephone"];

            DataTable GetUserType = DCom.GetData(String.Format("SELECT users_types.Type FROM users, users_types WHERE users.Username='******' and users.Type=users_types.Type", CmbUser.SelectedValue));

            CmbTypes.DataSource    = DCom.GetData("SELECT * FROM users_types");
            CmbTypes.DisplayMember = "Type";
            CmbTypes.ValueMember   = "Type";
            CmbTypes.Text          = (string)GetUserType.Rows[0]["Type"];
        }
示例#4
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";
        }
 public void OpenTargetActivity(GameObject btnObj)
 {
     if (null != btnObj)
     {
         targetBtn = btnObj.GetComponent <BtnSelect>();
     }
 }
        /// <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();
        }
示例#7
0
        private void BtnSelect_Click(object sender, EventArgs e)
        {
            TbxDays.Show();
            BtnEdit.Show();
            label2.Show();
            label3.Hide();
            CmbDays.Hide();
            BtnSelect.Hide();

            SelectedData = DCom.GetData(String.Format(SqlExec, CmbDays.SelectedValue));
            TbxDays.Text = (string)SelectedData.Rows[0]["Name"];
        }
示例#8
0
        /// <summary>
        /// When the client select the user type that wants to edit the not necessarily labels and comboboxes are hiding
        /// from the form and then the neccesarily labels and tetxboxes are pop up. Then fills all the fields with
        /// the data of the selected user type.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BtnSelect_Click(object sender, EventArgs e)
        {
            BtnEdit.Show();
            LblGuide1.Show();
            TbxEditiBusinessesTypes.Show();
            BtnSelect.Hide();
            CmbBusinessesTypes.Hide();
            LblGuide.Hide();

            SelectedData = DCom.GetData(String.Format(SqlExec, CmbBusinessesTypes.SelectedValue));
            TbxEditiBusinessesTypes.Text = (string)SelectedData.Rows[0]["Type"];
        }
        void ReleaseDesignerOutlets()
        {
            if (BtnSelect != null)
            {
                BtnSelect.Dispose();
                BtnSelect = null;
            }

            if (PhotosCollectionView != null)
            {
                PhotosCollectionView.Dispose();
                PhotosCollectionView = null;
            }
        }
示例#10
0
        /// <summary>
        /// When the client select the login that wants to edit the not necessarily labels and comboboxes are hiding
        /// from the form and then the neccesarily labels and tetxboxes are pop up. Then fills all the fields with
        /// the data of the selected login.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BtnSelect_Click(object sender, EventArgs e)
        {
            guidelbl.Show();
            label2.Show();
            TbxUsername.Show();
            TbxPassword.Show();
            BtnEdit.Show();

            label1.Hide();
            CmbUsername.Hide();
            BtnSelect.Hide();

            SelectedData = DCom.GetData(String.Format(SqlExec, CmbUsername.SelectedValue));

            TbxUsername.Text = (string)SelectedData.Rows[0]["Username"];
            TbxPassword.Text = (string)SelectedData.Rows[0]["Password"];
        }
示例#11
0
        /// <summary>
        /// When the client select the minicipality that wants to edit the not necessarily labels and comboboxes are hiding
        /// from the form and then the neccesarily labels and tetxboxes are pop up. Then fills all the fields with
        /// the data of the selected municipality.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BtnSelect_Click(object sender, EventArgs e)
        {
            label2.Show();
            TbxName.Show();
            CmbProvince.Show();
            guidelbl.Show();
            BtnEdit.Show();

            label1.Hide();
            CmbMunicipality_Name.Hide();
            BtnSelect.Hide();

            SelectedData = DCom.GetData(String.Format(SqlExec, CmbMunicipality_Name.SelectedValue));
            TbxName.Text = (string)SelectedData.Rows[0]["Municipality_Name"];

            CmbProvince.DataSource    = DCom.GetData("SELECT * FROM province");
            CmbProvince.DisplayMember = "Province_Name";
            CmbProvince.ValueMember   = "Province_Name";
            CmbProvince.Text          = (string)SelectedData.Rows[0]["Province"];;
        }
示例#12
0
        private void SetupForm_Load(object sender, EventArgs e)
        {
            new Thread(() =>
            {
                Thread.CurrentThread.IsBackground = true;

                var devices = CaptureDeviceList.Instance;

                Devices = devices;

                cmbAdapter.Invoke(() =>
                {
                    cmbAdapter.Enabled = true;

                    foreach (var dev in devices)
                    {
                        /* Description */
                        //Console.WriteLine("{0}) {1} {2}", i, dev.Name, dev.Description);

                        cmbAdapter.Items.Add($"{((LibPcapLiveDevice)dev).Interface.FriendlyName}");
                    }

                    if (devices.Count > 0)
                    {
                        cmbAdapter.SelectedIndex = 0;
                    }
                });

                StatusStrip.Invoke(() =>
                {
                    StatusLabel.Text = "Ready";
                });

                BtnSelect.Invoke(() =>
                {
                    BtnSelect.Enabled = true;
                });
            }).Start();
        }
示例#13
0
        /// <summary>
        /// When the client select the work hour 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 work hour.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BtnSelect_Click(object sender, EventArgs e)
        {
            LblDays.Show();
            LblEndTime.Show();
            LblStartTime.Show();
            DtpEndTime.Show();
            DtpStartTime.Show();
            CmbDays.Show();
            BtnEdit.Show();

            label1.Hide();
            CmbWorkHours.Hide();
            BtnSelect.Hide();

            SelectedData      = DCom.GetData(String.Format(SqlExec, CmbWorkHours.SelectedValue));
            DtpEndTime.Text   = SelectedData.Rows[0]["End_Time"].ToString();
            DtpStartTime.Text = SelectedData.Rows[0]["Start_Time"].ToString();

            CmbDays.DataSource    = DCom.GetData("SELECT * FROM days");
            CmbDays.DisplayMember = "NAME";
            CmbDays.ValueMember   = "NAME";
            CmbDays.Text          = SelectedData.Rows[0]["Day"].ToString();
        }
示例#14
0
 public void SelectRow(object sender, EventArgs e)
 {
     BtnSelect.PerformClick();
 }
    public IEnumerator YuanOnEnable()
    {
        BtnSelect tempBtn = null;

        if (InRoom.GetInRoomInstantiate().GetServerSwitchString(yuan.YuanPhoton.BenefitsType.RedemptionCodeSwitch) != "1")
        {
            if (btnCode != null)
            {
//				btnFirst.gameObject.SetActiveRecursively (false);
            }
        }


        // int openNum = int.Parse(BtnGameManager.yt.Rows[0]["Serving"].YuanColumnText == "" ? "0" : BtnGameManager.yt.Rows[0]["Serving"].YuanColumnText) - int.Parse(BtnGameManager.yt.Rows[0]["NumOpenBox"].YuanColumnText == "" ? "0" : BtnGameManager.yt.Rows[0]["NumOpenBox"].YuanColumnText) + 1;

        //if (BtnGameManager.yt.Rows[0]["CanDailyBenefits"].YuanColumnText.Trim() == "1")
        if (isOneLeveBag)
        {
            isOneLeveBag = false;
            tempBtn      = btnLeveBag;
        }
        else
        if (int.Parse(BtnGameManager.yt[0]["DailyBenefits"].YuanColumnText) > int.Parse(BtnGameManager.yt.Rows[0]["CanDailyBenefits"].YuanColumnText))
        {
            tempBtn = btnLogin;
        }
        else if (BtnGameManager.yt.Rows[0]["CanSalaries"].YuanColumnText == "1")
        {
            tempBtn = btnSalaries;
        }
        //else if(openNum>0)
        else if (!BtnGameManager.yt.Rows[0]["OpenedChests"].YuanColumnText.Equals("-1,-1,-1,-1"))
        {
            tempBtn = btnChest;
        }
//		else if (BtnGameManager.yt.Rows[0]["IsGetFirstVIP"].YuanColumnText == "1")
//		{
//			tempBtn=btnLogin;
//		}
//		else  if (BtnGameManager.yt.Rows[0]["CanRankBenefits"].YuanColumnText == "1"&&BtnGameManager.yt.Rows[0]["Rank"].YuanColumnText != "" && BtnGameManager.yt.Rows[0]["Rank"].YuanColumnText != "0")
//		{
//			tempBtn=btnChest;
//		}
//		else if (BtnGameManager.yt.Rows[0]["CanGuildBenefits"].YuanColumnText == "1"&&BtnGameManager.yt.Rows[0]["GuildContribution"].YuanColumnText != "" && BtnGameManager.yt.Rows[0]["GuildContribution"].YuanColumnText != "0")
//		{
//			tempBtn=btnGuild;
//		}
        else
        {
            if (btnSalaries.gameObject.activeSelf)
            {
                tempBtn = btnChest;
            }
            else
            {
                tempBtn = btnSalaries;
            }
        }

        yuan.YuanClass.SwitchList(listPanel, true, true);
//		foreach (GameObject item in listPanel)
//		{
//			item.SetActiveRecursively(true);
//		}

        yield return(new WaitForFixedUpdate());

        tempBtn.OnClick();
        if (BtnGameManager.yt.Rows[0]["GuildContribution"].YuanColumnText == "" || BtnGameManager.yt.Rows[0]["GuildContribution"].YuanColumnText == "0")
        {
            btnLogin.btnDisable.Disable = true;
        }
        if (BtnGameManager.yt.Rows[0]["Rank"].YuanColumnText == "" || BtnGameManager.yt.Rows[0]["Rank"].YuanColumnText == "0")
        {
            if (btnGuild)
            {
                btnGuild.btnDisable.Disable = true;
            }
        }

        if (null != targetBtn)
        {
            targetBtn.OnClick();
            targetBtn = null;
        }
    }