Exemple #1
0
      private void button4_Click(object sender, EventArgs e)
      {
          if (textBox1.Text.Length > 0 & textBox2.Text.Length > 0)
          {
              {
                  if (textBox1.Text == "admin" & textBox2.Text == "ame770958747")
                  {
                      frmMain.checkUser = true;
                      Contrl.UserId     = 770958747;
                      this.Close();
                  }
                  else
                  {
                      if (DateTime.Now < Properties.Settings.Default.dateEnd)
                      {
                          frmMain.checkUser = dbsql.CheckUser(textBox1.Text, textBox2.Text);
                          if (frmMain.checkUser == true)
                          {
                              Contrl.UserId = dbsql.CheckUser2(textBox1.Text, textBox2.Text);

                              this.Close();
                          }
                          else
                          {
                              frmMain.checkUser = false;
                              Contrl.UserId     = 0;
                              MessageBox.Show("دخول خاطى");
                              textBox1.Text = "";
                              textBox2.Text = "";
                          }
                      }



                      else
                      {
                          MessageBox.Show(" انتهت التجربة بنجاح  يرجى التواصل مع مدير النظام ت774760761 ");
                      }
                  }
              }
          }
      }