public static int EkleneniYoxla(string kolonismi, string deger) { ORM <ET> orm = new ORM <ET>(ORMBase <ET> .InstanceGetir()); DataTable dt = orm.Select(kolonismi, deger); int sayac = 0; foreach (DataRow dr in dt.Rows) { sayac++; } return(sayac); }
public static string AdGetir(string id) { string ad = ""; ORM <Iskiler> orm = new ORM <Iskiler>(ORMBase <Iskiler> .InstanceGetir()); DataTable dt = orm.Select("IsciId", id); foreach (DataRow dr in dt.Rows) { ad = dr["IsciAdi"].ToString(); } return(ad); }
private static string[] UserYoxlaTool(string ad, string parol) { ORM <IsciSistemMelumat> orm = new ORM <IsciSistemMelumat>(ORMBase <IsciSistemMelumat> .InstanceGetir()); DataTable dt = orm.Select("Username", ad); string[] str = new string[3]; foreach (DataRow dr in dt.Rows) { if (dr["Password"].ToString() == parol) { str[0] = dr["IsciID"].ToString(); str[1] = dr["Rol"].ToString(); } } return(str); }
public static bool Guncelle(ET entity, int id) { ORM <ET> orm = new ORM <ET>(ORMBase <ET> .InstanceGetir()); return(orm.Guncelle(entity, id)); }
public static bool Sil(int id) { ORM <ET> orm = new ORM <ET>(ORMBase <ET> .InstanceGetir()); return(orm.Sil(id)); }
public static bool Ekle(ET entity) { ORM <ET> orm = new ORM <ET>(ORMBase <ET> .InstanceGetir()); return(orm.Ekle(entity)); }
public static DataTable SelectAll() { ORM <ET> orm = new ORM <ET>(ORMBase <ET> .InstanceGetir()); return(orm.SelectAll()); }
public static DataTable Select(string kolonismi, string deger) { ORM <ET> orm = new ORM <ET>(ORMBase <ET> .InstanceGetir()); return(orm.Select(kolonismi, deger)); }