protected void btnGiris_Click(object sender, EventArgs e)
        {
            try
            {
                using (DataContext Context = Global.DBContext)
                {
                    Kullanici Kul = Context.GetTable <Kullanici>().Where(x => x.KulKodu == txtKullaniciAdi.Text.Trim() && x.Pass == txtSifre.Text.Trim()).SingleOrDefault();

                    if (Kul.IsNotNull())
                    {
                        Session["GorevFiltre"]   = null;
                        Session["CalismaFiltre"] = null;
                        Global.Kullanici         = Kul;
                        Response.Redirect("../Gorev.aspx");
                    }
                    else
                    {
                        lblHata.Text = "Kullanıcı bulunamadı...";
                    }
                }
            }
            catch (Exception hata)
            {
                hata.HataYaz();
                lblHata.Text = hata.Message;
            }
        }
Exemple #2
0
        protected void btnGiris_Click(object sender, EventArgs e)
        {
            try
            {
                using (DataContext Context = Global.DBContext)
                {
                    Kullanici Kul = Context.GetTable <Kullanici>().Where(x => x.KulKodu == Global.Kullanici.KulKodu && x.Pass == txtSifre.Text.Trim()).SingleOrDefault();

                    if (Kul.IsNotNull())
                    {
                        Global.Kullanici = Kul;
                        //Response.Redirect("../Main.aspx");
                        Response.Redirect("../Gorev.aspx");
                    }
                    else
                    {
                    }
                }
            }
            catch (Exception hata)
            {
                hata.HataYaz();
            }
        }