Example #1
0
 private void btn_Giris_Click(object sender, EventArgs e)
 {
     try
     {
         Kullanicilar user = new Kullanicilar();
         user.KullaniciAdi = txt_KullaniciAdi.Text;
         user.Sifre        = txt_Sifre.Text;
         string md5 = Tools.CreateMD5(user.Sifre);
         if (string.IsNullOrEmpty(user.KullaniciAdi) || string.IsNullOrEmpty(md5))
         {
             throw new ValidationException("Kullanıcı Adı ve Şifre Boş Geçilemez !");
         }
         user.Sifre = md5;
         var result = UsersController.UserAdminLogin(user);
         LoginForm._session       = ERoles.Admin.ToString();
         LoginForm._userIdSession = result.KullaniciId;
         GeneralForm gf = new GeneralForm();
         gf.Show();
         this.Hide();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Hata Meydana Geldi !", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
    ConfigForm Config = new ConfigForm(General);     /* you send General */

    private void Menu_Load(object sender, EventArgs e)
    {
        //Load of Config Form
        Config.MdiParent = this.MdiParent;
        Config.Show();

        //Load of General Form
        General.Show();
        General.TopLevel = false;
        Config.Controls["panel1"].Controls.Add(General);
    }