Beispiel #1
0
 private void initiate()
 {
     dgv.DataSource = AccountClass.Select().Tables[0].DefaultView;
     tbCreateAdd.Clear();
     tbCreateCell.Clear();
     tbCreateName.Clear();
     tbCreatePass.Clear();
     tbCreateName.Focus();
 }
Beispiel #2
0
        private void frLogin_Load(object sender, EventArgs e)
        {
            try
            {
                pictureBox1.Image = Properties.Resources.login;
                SqlHelper s = new SqlHelper();

                if (s.isConnected())
                {
                    DataSet ds = AccountClass.Select();
                    cboUser.DataSource    = ds.Tables[0];
                    cboUser.DisplayMember = "Name";
                    cboUser.ValueMember   = "UserID";
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(@"this is error" + ex.Message);
            }
        }