Exemple #1
0
        public static int CalisanDuzelt(string kullaniciAdi, string telefon, string eposta, string sifre, string departmanID, string kullaniciYetki, FileUpload fuGorsel, string eskiGorsel, string kullaniciID)
        {
            if (fuGorsel.HasFile)
            {
                eskiGorsel = Araclar.ResimYukle(fuGorsel.PostedFile, 0, 0, HttpContext.Current.Server.MapPath("~/Uploads/Calisanlar/"), "", Guid.NewGuid().ToString());
            }
            string kod = "Update tblKullanicilar Set KullaniciAdi=@kullaniciAdi, Telefon=@telefon, EPosta=@eposta, Sifre=@sifre, DepartmanID=@departmanID, KullaniciYetki=@kullaniciYetki, Gorsel=@fuGorsel Where KullaniciID=@kullaniciID";

            string[] veri      = { kullaniciAdi, telefon, eposta, sifre, departmanID, kullaniciYetki, eskiGorsel, kullaniciID };
            string[] parametre = { "@adiSoyadi", "@telefon", "@eposta", "@sifre", "@departmanID", "@kullaniciYetki", "@fuGorsel", "@kullaniciID" };
            return(VT.ExecuteNonQuery(kod, veri, parametre));
        }
Exemple #2
0
        public static int CalisanEkle(string kullaniciAdi, string telefon, string eposta, string sifre, string departmanID, string kullaniciYetki, FileUpload fuGorsel)
        {
            string yol = "";

            if (fuGorsel.HasFile)
            {
                yol = Araclar.ResimYukle(fuGorsel.PostedFile, 0, 0, HttpContext.Current.Server.MapPath("~/Uploads/Calisanlar/"), "", Guid.NewGuid().ToString());
            }
            string kod = "Insert Into tblKullanicilar (KullaniciAdi, Telefon, EPosta, Sifre, DepartmanID, KullaniciYetki, Gorsel) Values (@kullaniciAdi, @telefon, @eposta, @sifre, @departmanID, @kullaniciYetki, @fuGorsel)";

            string[] veri      = { kullaniciAdi, telefon, eposta, sifre, departmanID, kullaniciYetki, yol };
            string[] parametre = { "@kullaniciAdi", "@telefon", "@eposta", "@sifre", "@departmanID", "@kullaniciYetki", "@fuGorsel" };
            return(VT.ExecuteNonQuery(kod, veri, parametre));
        }