void FavoriIslemleri() { WebService webService = new WebService(); FavoriDTO favoriDTO = new FavoriDTO() { userId = MeDTO.id, favUserId = MesajlarIcinSecilenKullanici.Kullanici.id }; string jsonString = JsonConvert.SerializeObject(favoriDTO); var Donus = webService.ServisIslem("users/fav", jsonString); if (Donus != "Hata") { //CustomAlert.GetCustomAlert(this, "Favorilere Ekledi."); //ButtonAktifPasifBgYap(true); FavorileriCagir(); return; } else { CustomAlert.GetCustomAlert(this, "Bir Sorun Oluþtu."); ButtonAktifPasifBgYap(false); return; } }
public FavoriDTO Map(Favori ent) { var favori = new FavoriDTO(); favori.doktorAdi = ent.Doktor.adi; favori.doktorID = ent.doktorID; favori.doktorSoyadi = ent.Doktor.soyadi; favori.favoriID = ent.favoriID; favori.kullaniciAdi = ent.Kullanici.KullaniciBilgileri.adi; favori.kullaniciSoyadi = ent.Kullanici.KullaniciBilgileri.soyadi; favori.kullaniciID = ent.kullaniciID; return(favori); }
void FavoriIslemleri(string Message) { var MeID = DataBase.MEMBER_DATA_GETIR()[0].id; WebService webService = new WebService(); FavoriDTO favoriDTO = new FavoriDTO() { userId = MeID, favUserId = MesajlarIcinSecilenKullanici.Kullanici.id }; string jsonString = JsonConvert.SerializeObject(favoriDTO); var Donus = webService.ServisIslem("users/fav", jsonString); if (Donus != "Hata") { AlertHelper.AlertGoster(Message, this); GetFavorite(); return; } }
void FavoriIslemleri(string Message) { var MeID = DataBase.MEMBER_DATA_GETIR()[0].id; WebService webService = new WebService(); FavoriDTO favoriDTO = new FavoriDTO() { userId = MeID, favUserId = SecilenKisi.SecilenKisiDTO.id }; string jsonString = JsonConvert.SerializeObject(favoriDTO); var Donus = webService.ServisIslem("users/fav", jsonString); if (Donus != "Hata") { CustomAlert.GetCustomAlert(this, Message); GetFavorite(); return; } }
public List <FavoriDTO> MapAll(List <Favori> model) { var favoriler = new List <FavoriDTO>(); foreach (var ent in model.ToList()) { var favori = new FavoriDTO(); favori.doktorAdi = ent.Doktor.adi; favori.doktorID = ent.doktorID; favori.doktorSoyadi = ent.Doktor.soyadi; favori.favoriID = ent.favoriID; favori.kullaniciAdi = ent.Kullanici.KullaniciBilgileri.adi; favori.kullaniciSoyadi = ent.Kullanici.KullaniciBilgileri.soyadi; favori.kullaniciID = ent.kullaniciID; favori.bolumAd = ent.Doktor.Bolum.bolumAdi; favori.hastaneAdi = ent.Doktor.Hastane.hastaneAdi; favoriler.Add(favori); } return(favoriler); }
public void OnClick(View v) { int Tagg = (int)v.Tag; var itemm = mDepartmanlar[Tagg]; var MeDTO = DataBase.MEMBER_DATA_GETIR()[0]; WebService webService = new WebService(); FavoriDTO favoriDTO = new FavoriDTO() { userId = MeDTO.id, favUserId = itemm.receiverId }; string jsonString = JsonConvert.SerializeObject(favoriDTO); var IsFollow = FollowListID.FindAll(item => item == itemm.receiverId.ToString()); if (IsFollow.Count > 0)//Fav varmış Kaldır { ((Android.Support.V7.App.AppCompatActivity) mContext).RunOnUiThread(delegate() { if (FavEkleKaldir(jsonString, (v as ImageView))) { (v as ImageView).SetBackgroundResource(Resource.Drawable.favori_pasif); FollowListID.Remove(itemm.receiverId.ToString()); AlertHelper.AlertGoster("Favorilerden Çıkarıldı.", mContext); return; } }); } else//Fav yokmus Ekle { ((Android.Support.V7.App.AppCompatActivity) mContext).RunOnUiThread(delegate() { if (FavEkleKaldir(jsonString, (v as ImageView))) { (v as ImageView).SetBackgroundResource(Resource.Drawable.favori_aktif); FollowListID.Add(itemm.receiverId.ToString()); AlertHelper.AlertGoster("Favorilere Eklendi.", mContext); } }); } }
void FavoriIslemleri(string Message) { new System.Threading.Thread(new System.Threading.ThreadStart(delegate { var MeID = DataBase.MEMBER_DATA_GETIR()[0].id; WebService webService = new WebService(); FavoriDTO favoriDTO = new FavoriDTO() { userId = MeID, favUserId = SecilenKisi.SecilenKisiDTO.id }; string jsonString = JsonConvert.SerializeObject(favoriDTO); var Donus = webService.ServisIslem("users/fav", jsonString); if (Donus != "Hata") { RunOnUiThread(delegate { AlertHelper.AlertGoster(Message, this); }); GetFavorite(); return; } })).Start(); }