public ActionResult CariBilgi(int id)
        {
            using (sayazilimEntities db = new sayazilimEntities())
            {
                Cari   emp      = db.Cari.Where(x => x.ID == id).FirstOrDefault <Cari>();
                string websifre = GirisKontrol.unhash(emp.WebSifre, true);
                emp.WebSifre = websifre;

                BALANCE BAL = db.BALANCE.Where(x => x.cariID == id && x.paraBirimi == emp.paraBirimi).FirstOrDefault <BALANCE>();

                return(Json(new { success = true, data = emp, bl = BAL }, JsonRequestBehavior.AllowGet));
            }
        }
        public ActionResult PersonelBilgi(int id)
        {
            using (sayazilimEntities db = new sayazilimEntities())
            {
                Personel emp = db.Personel.Where(x => x.ID == id).FirstOrDefault <Personel>();

                string websifre = GirisKontrol.unhash(emp.WebSifre, true);
                emp.WebSifre = websifre;


                Yetkiler        yt       = db.Yetkiler.Where(x => x.PersonelID == id).FirstOrDefault <Yetkiler>();
                PersonelBilgiEk personel = new PersonelBilgiEk();

                personel.pr = emp;
                personel.yt = yt;



                return(Json(new { success = true, data = personel }, JsonRequestBehavior.AllowGet));
            }
        }
Beispiel #3
0
        public ActionResult Remember(string Mail)
        {
            string KA = "";
            string SF = "";

            string con = ConfigurationManager.ConnectionStrings["dbconnection"].ConnectionString;

            using (SqlConnection connection = new SqlConnection(con))
            {
                connection.Open();
                using (SqlCommand sqlCommand = new SqlCommand("Select * From  CARi where ePOSTA='" + Mail + "' ", connection))
                {
                    using (SqlDataReader dr = sqlCommand.ExecuteReader())
                    {
                        while (dr.Read())
                        {
                            KA = dr["WEBKA"].ToString();
                            SF = GirisKontrol.unhash(dr["WEBSifre"].ToString().Trim(), true);
                        }
                    }
                }
            }



            SendEmail(Mail, KA, SF);

            ViewBag.Mesaj = "Hatırlatma mailiniz başarıyla gönderilmiştir";

            Session["PersonelID"]   = null;
            Session["UserName"]     = null;
            Session["User"]         = null;
            Session["PersonelType"] = null;
            Session["RaporGor"]     = null;
            Session["FirmaKodu"]    = null;
            Session["PersonelAdi"]  = null;
            Session["Grubu"]        = null;
            return(View());
        }