예제 #1
0
        public static string Olustur(KullaniciGrup param)
        {
            StringBuilder builder = new StringBuilder("<ROOT>");

            foreach (long item in param.Yetkiler)
            {
                builder.Append("<R id=\"" + item + "\" />");
            }

            builder.Append("</ROOT>");

            return(Sql.GetInstance().Get("sp_kullanici_grup_olustur", new List <object> {
                Kullanici.Oturum().Id,
                param.Ad,
                param.LoginRedirectUrl,
                param.Silinemez,
                builder.ToString()
            }, (row) => {
                return row.GetString("Result");
            }));
        }
예제 #2
0
        public static KullaniciGrup Detay(int id)
        {
            KullaniciGrup kullaniciGrup = new KullaniciGrup();

            Sql.GetInstance().Set("sp_kullanici_grup_detay", new List <object> {
                Kullanici.Oturum().Id, id
            }, (ds) =>
            {
                kullaniciGrup = Parse(ds.Tables[0].Rows[0]);

                if (ds.Tables.Count <= 1)
                {
                    return;
                }

                foreach (DataRow row in ds.Tables[1].Rows)
                {
                    kullaniciGrup.YetkiListesi.Add(Yetki.Parse(row));
                }
            });

            return(kullaniciGrup);
        }