예제 #1
0
 private void BtnNew_Click(object sender, EventArgs e)
 {
     TbxID.Clear();
     TbxName.Clear();
     TbxVorname.Clear();
     TbxStrasse.Clear();
     TbxPLZ.Clear();
     TbxOrt.Clear();
     TbxTelefon.Clear();
     TbxName.Focus();
 }
예제 #2
0
        /// <summary>
        /// In forms constructor the not necessarily labels and tetxboxes are hiding
        /// from the form. Then the combobox for login(CmbUsername) is filling
        /// from the user types(users_types) table.
        /// /// </summary>
        public EditMunicipality()
        {
            InitializeComponent();
            guidelbl.Hide();
            label2.Hide();
            TbxName.Hide();
            CmbProvince.Hide();

            CmbMunicipality_Name.DataSource    = DCom.GetData("SELECT * FROM municipality WHERE Municipality_Name = '{0}'");
            CmbMunicipality_Name.DisplayMember = "NAME";
            CmbMunicipality_Name.ValueMember   = "NAME";
        }
예제 #3
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)
        {
            label2.Show();
            TbxName.Show();
            CmbProvince.Show();
            guidelbl.Show();

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

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

            CmbProvince.DataSource    = DCom.GetData("SELECT * FROM municipality");
            CmbProvince.DisplayMember = "Municipality_Name";
            CmbProvince.ValueMember   = "Municipality_Name";
        }
예제 #4
0
 private void BtnNewId_Click(object sender, EventArgs e)
 {
     TbxId.Text = Guid.NewGuid().ToString();
     TbxName.Focus();
 }
예제 #5
0
파일: Form1.cs 프로젝트: APhath/TEST
 private void Form1_Load(object sender, EventArgs e)
 {
     TbxName.Select();
     this.FormBorderStyle = FormBorderStyle.FixedSingle;
     this.CenterToScreen();
 }