/// <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 EditLogin() { InitializeComponent(); guidelbl.Hide(); label2.Hide(); TbxUsername.Hide(); TbxPassword.Hide(); BtnEdit.Hide(); CmbUsername.DataSource = DCom.GetData("SELECT * FROM login"); CmbUsername.DisplayMember = "Username"; CmbUsername.ValueMember = "Username"; }
/// <summary> /// In forms constructor the not necessarily labels, tetxboxes and comboboxes are hiding /// from the form. Then the combobox for users(CmbUser) is filling with the usernames and NAMES /// from table users. /// </summary> public EditUser() { InitializeComponent(); label1.Hide(); label2.Hide(); label3.Hide(); label4.Hide(); label5.Hide(); label6.Hide(); TbxFirstName.Hide(); TbxLastName.Hide(); TbxUsername.Hide(); TbxTelephone.Hide(); TbxEmail.Hide(); CmbTypes.Hide(); BtnEdit.Hide(); CmbUser.DataSource = DCom.GetData("SELECT Username,CONCAT(Last_name,' ' , First_Name) AS NAME FROM users"); CmbUser.DisplayMember = "NAME"; CmbUser.ValueMember = "Username"; }