Exemple #1
0
        void UseBoostOrSuperBoost(string LicenceType)
        {
            WebService webService = new WebService();
            var        Donus      = webService.ServisIslem("licences/use", LicenceType, ContentType: "text/plain");

            if (Donus != "Hata")
            {
                switch (LicenceType)
                {
                case "SUPER_BOOST":
                    CustomAlert.GetCustomAlert(this, "1 Super Boost Aktifleştirildi.");
                    break;

                case "BOOST":
                    CustomAlert.GetCustomAlert(this, "1 Boost Aktifleştirildi.");
                    break;

                default:
                    break;
                }

                GetUserLicence();
            }
            else
            {
                CustomAlert.GetCustomAlert(this, "Bir sorun oluştu. Lütfen daha sonra tekrar deneyin.");
            }
        }
Exemple #2
0
        void PopulerLokasyonlariGetir()
        {
            WebService webService = new WebService();
            var        Donus      = webService.OkuGetir("locations");

            if (Donus != null)
            {
                var aa = Donus.ToString();
                Mekanlar_Locations = Newtonsoft.Json.JsonConvert.DeserializeObject <List <Mekanlar_Location> >(Donus.ToString());
                Mekanlar_Locations = Mekanlar_Locations.OrderBy(o => o.allUserCheckIn).ToList();//Checkin sayýsýna göre sýralýyor.
                Mekanlar_Locations.Reverse();
                if (Mekanlar_Locations.Count > 0)
                {
                    InvokeOnMainThread(delegate() {
                        Tablo.Source = new LokasyonlarCustomTableCellSoruce(Mekanlar_Locations, this);
                        Tablo.ReloadData();
                        Tablo.BackgroundColor = UIColor.Clear;
                        Tablo.SeparatorStyle  = UITableViewCellSeparatorStyle.None;
                        CustomLoading.Hide();
                    });
                }
                else
                {
                    CustomAlert.GetCustomAlert(GelenBase1, "Çevrenizde hiç popüler lokasyon bulunamadı...");
                    InvokeOnMainThread(delegate() {
                        CustomLoading.Hide();
                    });
                }
            }
            else
            {
                CustomLoading.Hide();
            }
        }
 bool control()
 {
     if (birtdLbl.Text.Trim() == "" && MeslekText.Text.Trim() == "" && !KadinRadio.Selected == true && !ErkekRadio.Selected == true)
     {
         CustomAlert.GetCustomAlert(this, "Lütfen bilgilerinizi tamamlayın.");
         return(false);
     }
     else if (birtdLbl.Text.Trim() == "")
     {
         CustomAlert.GetCustomAlert(this, "Lütfen doğum tarihinizi girin.");
         return(false);
     }
     else if (MeslekText.Text.Trim() == "")
     {
         CustomAlert.GetCustomAlert(this, "Lütfen mesleğinizi girin.");
         return(false);
     }
     else if (!KadinRadio.Selected == true && !ErkekRadio.Selected == true)
     {
         CustomAlert.GetCustomAlert(this, "Lütfen cinsiyetinizi belirtiniz.");
         return(false);
     }
     else
     {
         return(true);
     }
 }
Exemple #4
0
        void Kayit()
        {
            List <UserAnswersDTO> NullOlmayanlar = new List <UserAnswersDTO>();

            for (int i = 0; i < userAnswers.Count; i++)
            {
                if (userAnswers[i] != null)
                {
                    NullOlmayanlar.Add(userAnswers[i]);
                }
            }
            string     jsonString = JsonConvert.SerializeObject(NullOlmayanlar);
            WebService webService = new WebService();
            var        Donus      = webService.ServisIslem("answers/user", jsonString);

            if (Donus != "Hata")
            {
                CustomAlert.GetCustomAlert(this, "Cevaplarınız için teşekkürler.");
                DismissViewController(false, null);
                ProfilSorulariBaseVC1.DismissViewController(false, null);
                return;
            }
            else
            {
                CustomAlert.GetCustomAlert(this, "Bir sorun oluştu");
                return;
            }
        }
Exemple #5
0
        public void UnBlockedUser(int id)
        {
            UIAlertView alert = new UIAlertView();

            alert.Title = "Buptis";
            alert.AddButton("Evet");
            alert.AddButton("Hayır");
            alert.Message        = "Kullanıcının engelini kaldırmak istediğinize emin misiniz ?";
            alert.AlertViewStyle = UIAlertViewStyle.Default;
            alert.Clicked       += (object s, UIButtonEventArgs ev) =>
            {
                if (ev.ButtonIndex == 0)
                {
                    alert.Dispose();
                    WebService webService = new WebService();
                    var        Donus      = webService.ServisIslem("blocked-users/" + id, "", Method: "DELETE");
                    if (Donus != "Hata")
                    {
                        GetBlockedUserList();
                        CustomAlert.GetCustomAlert(this, "Kullanıcının engeli kaldırılıyor.");
                    }
                }
                else
                {
                    alert.Dispose();
                }
            };
            alert.Show();
        }
 private void KaydetButton_TouchUpInside(object sender, EventArgs e)
 {
     if (control())
     {
         UpdateUserDto UpdateUserDto1 = new UpdateUserDto()
         {
             activated = true,
             birthDay  = Convert.ToDateTime(birtdLbl.Text).ToString("yyyy-MM-dd'T'HH:mm:ssZ"),
             gender    = getGender,
             userJob   = MeslekText.Text
         };
         WebService webService = new WebService();
         string     jsonString = JsonConvert.SerializeObject(UpdateUserDto1);
         var        Donus      = webService.ServisIslem("users/update", jsonString);
         if (Donus != "Hata")
         {
             var UserData = DataBase.MEMBER_DATA_GETIR()[0];
             UserData.userJob      = MeslekText.Text;
             UserData.birthDayDate = Convert.ToDateTime(birtdLbl.Text);
             UserData.gender       = getGender;
             if (DataBase.MEMBER_DATA_Guncelle(UserData))
             {
                 CustomAlert.GetCustomAlert(this, "Bilgileriniz güncellendi.");
                 this.DismissViewController(true, null);
             }
         }
         else
         {
             CustomAlert.GetCustomAlert(this, "Bir Sorun Oluştu.");
         }
     }
 }
Exemple #7
0
 void KredisimiBitti()
 {
     new System.Threading.Thread(new System.Threading.ThreadStart(delegate
     {
         var MeID = DataBase.MEMBER_DATA_GETIR()[0].id;
         WebService webService = new WebService();
         var Donus             = webService.OkuGetir("users/" + MeID);
         if (Donus != null)
         {
             var Icerikk = Newtonsoft.Json.JsonConvert.DeserializeObject <MEMBER_DATA>(Donus.ToString());
             if (Icerikk.messageCount <= 0)
             {
                 InvokeOnMainThread(delegate() {
                     var KrediModal = UIStoryboard.FromName("PaketlerBase", NSBundle.MainBundle);
                     KrediYukleBaseVC controller       = KrediModal.InstantiateViewController("KrediYukleBaseVC") as KrediYukleBaseVC;
                     controller.PrivateProfileVC1      = null;
                     controller.ModalPresentationStyle = UIModalPresentationStyle.OverFullScreen;
                     this.PresentViewController(controller, true, null);
                 });
             }
             else
             {
                 InvokeOnMainThread(delegate() {
                     CustomAlert.GetCustomAlert(this, "Lütfen internet bağlantınızı kontrol edin.");
                 });
             }
         }
         else
         {
             InvokeOnMainThread(delegate() {
                 CustomAlert.GetCustomAlert(this, "Lütfen internet bağlantınızı kontrol edin.");
             });
         }
     })).Start();
 }
Exemple #8
0
        void GetLocation()
        {
            WebService webService = new WebService();
            var        Donus      = webService.OkuGetir("users/location/" + GelenMekan.id + "/online");
            var        MEDID      = DataBase.MEMBER_DATA_GETIR()[0].id;

            if (Donus != null)
            {
                var aa = Donus.ToString();
                LokasyondakiKisilerList = Newtonsoft.Json.JsonConvert.DeserializeObject <List <MEMBER_DATA> >(Donus.ToString());
                LokasyondakiKisilerList = LokasyondakiKisilerList.FindAll(item => item.id != MEDID);
                if (LokasyondakiKisilerList.Count > 0)
                {
                    InvokeOnMainThread(() =>
                    {
                        FilterUsers();
                        SuperBoostKullaniminaGoreSirala();
                        FillDataModel();
                    });
                }
                else
                {
                    CustomAlert.GetCustomAlert(gelenbase, "Henüz bu lokasyonda çevrim içi kimse bulunamıyor.");
                    CustomLoading.Hide();
                }
            }
            else
            {
                CustomAlert.GetCustomAlert(gelenbase, "Henüz bu lokasyonda çevrim içi kimse bulunamıyor.");
                CustomLoading.Hide();
            }
        }
Exemple #9
0
        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;
            }
        }
        void PaketSatinAlmaUzakDBAyarla(int Miktar)
        {
            LicenceBuyDTO licenceBuyDTO = new LicenceBuyDTO()
            {
                count       = 0,
                credit      = Miktar,
                licenceType = "ONLY_CREDÝT"
            };

            WebService webService = new WebService();
            string     jsonString = JsonConvert.SerializeObject(licenceBuyDTO);
            var        Donus      = webService.ServisIslem("licences/buy", jsonString);

            if (Donus != "Hata")
            {
                CustomAlert.GetCustomAlert(this, Miktar + " Kredi Satın Aldınız.");
                if (PrivateProfileVC1 != null)
                {
                    PrivateProfileVC1.GetUserLicence();
                }
                this.DismissViewController(true, null);
            }
            else
            {
                CustomAlert.GetCustomAlert(this, "Bir sorun oluştu. Lütfen tekrar deneyin.");
            }
        }
        void CreateScrollViews()
        {
            GetUserAnswers();
            var        PageeIndex = (nint)(ContentScroll.ContentOffset.X / ContentScroll.Frame.Width);
            WebService webService = new WebService();
            var        Donus      = webService.OkuGetir("questions");

            if (Donus != null)
            {
                QuestionDTOs    = Newtonsoft.Json.JsonConvert.DeserializeObject <List <QuestionDTO> >(Donus.ToString());
                QuestionDTOs    = QuestionDTOs.FindAll(item => item.type != "CATEGORY_QUESTION");
                CountLabel.Text = (PageeIndex + 1).ToString() + "/" + QuestionDTOs.Count.ToString();
            }
            if (QuestionDTOs.Count > 0)
            {
                Noktalar = new UIViewController[QuestionDTOs.Count];
                var b1 = ContentScroll.Frame.Width;
                for (int i = 0; i < QuestionDTOs.Count; i++)
                {
                    if (QuestionDTOs[i].type == "MULTIPLE_CHOICE")
                    {
                        NoktaItem = this.Storyboard.InstantiateViewController("CoktanSecmeliSoruVC") as CoktanSecmeliSoruVC;
                        (NoktaItem as CoktanSecmeliSoruVC).GelenSoru  = QuestionDTOs[i];
                        (NoktaItem as CoktanSecmeliSoruVC).userAnswer = this.userAnswer;
                        NoktaItem.View.Frame = new CoreGraphics.CGRect(0, 0, b1, ContentScroll.Frame.Height);
                    }
                    else if (QuestionDTOs[i].type == "OPEN_TIP")
                    {
                        NoktaItem = this.Storyboard.InstantiateViewController("RangeSoruVC") as RangeSoruVC;
                        (NoktaItem as RangeSoruVC).GelenSoru  = QuestionDTOs[i];
                        (NoktaItem as RangeSoruVC).userAnswer = this.userAnswer;
                        NoktaItem.View.Frame = new CoreGraphics.CGRect(0, 0, b1, ContentScroll.Frame.Height);
                    }
                    if (i == 0)
                    {
                        NoktaItem.View.Frame = new CoreGraphics.CGRect(0, 0, b1, ContentScroll.Frame.Height);
                    }
                    else
                    {
                        NoktaItem.View.Frame = new CoreGraphics.CGRect(b1 * i, 0, b1, ContentScroll.Frame.Height);
                    }
                    NoktaItem.WillMoveToParentViewController(this);
                    ContentScroll.AddSubview(NoktaItem.View);
                    this.AddChildViewController(NoktaItem);
                    NoktaItem.DidMoveToParentViewController(this);
                    Noktalar[i] = NoktaItem;
                }
                CountLabel.Text = "1/" + Noktalar.Length;
                var RightPointt = Noktalar[Noktalar.Length - 1].View.Frame.Right;
                ContentScroll.ContentSize   = new CoreGraphics.CGSize(RightPointt, ContentScroll.Frame.Height);
                ContentScroll.PagingEnabled = true;
            }
            else
            {
                CustomAlert.GetCustomAlert(this, "Henüz profil soruların hazır değil.");
                this.DismissViewController(true, null);
            }
        }
        async void PaketSatinAl(int SeilenPaket)
        {
            var    countt = 0;
            string pakett = "";

            switch (SeilenPaket)
            {
            case 1:
                countt = 1;
                pakett = "com.buptis.ios.birsuperboost";
                break;

            case 2:
                countt = 2;
                pakett = "com.buptis.ios.ikisuperboost";
                break;

            case 3:
                countt = 3;
                pakett = "com.buptis.ios.ucsuperboost";
                break;

            case 4:
                countt = 5;
                pakett = "com.buptis.ios.bessuperboost";
                break;

            default:
                break;
            }

            if (countt != 0)
            {
                try
                {
                    var Durumm = await PurchaseItem(pakett, "buptispayload2");

                    if (Durumm)
                    {
                        PaketSatinAlmaUzakDBAyarla(countt);
                    }
                    else
                    {
                        CustomAlert.GetCustomAlert(this, "Satın Alma Başarısız.");
                    }
                }
                catch (Exception ex)
                {
                    CustomAlert.GetCustomAlert(this, ex.Message);
                    Console.WriteLine(ex);
                }
            }
            else
            {
                CustomAlert.GetCustomAlert(this, "Lütfen bir paket seçin.");
            }
        }
Exemple #13
0
        void OnAuthError(object sender, AuthenticatorErrorEventArgs e)
        {
            var authenticator = sender as OAuth2Authenticator;

            if (authenticator != null)
            {
                authenticator.Completed -= OnAuthCompleted;
                authenticator.Error     -= OnAuthError;
            }
            CustomAlert.GetCustomAlert(this, "Bir sorun oluştu. Lütfen tekrar deneyin.");
        }
Exemple #14
0
        private void EngelleButton_TouchUpInside(object sender, EventArgs e)
        {
            var engeldurum = GetBlockedFriends();

            if (engeldurum)
            {
                UIAlertView alert = new UIAlertView();
                alert.Title = "Buptis";
                alert.AddButton("Evet");
                alert.AddButton("Hayır");
                alert.Message        = "Kullanıcının engelini kaldırmak istediğinize emin misiniz ?";
                alert.AlertViewStyle = UIAlertViewStyle.Default;
                alert.Clicked       += (object s, UIButtonEventArgs ev) =>
                {
                    if (ev.ButtonIndex == 0)
                    {
                        alert.Dispose();
                        WebService webService = new WebService();
                        var        Donus      = webService.ServisIslem("blocked-users/" + SecilenKisi.SecilenKisiDTO.id, "", Method: "DELETE");
                        if (Donus != "Hata")
                        {
                            var engeldurum2 = GetBlockedFriends();
                            if (engeldurum2)
                            {
                                EngelleButton.SetTitle("Engeli Kaldır", UIControlState.Normal);
                            }
                            else
                            {
                                EngelleButton.SetTitle("Engelle, Þikayet Et", UIControlState.Normal);
                            }
                            CustomAlert.GetCustomAlert(this, "Kullanıcının engeli kaldırıldı");
                        }
                    }
                    else
                    {
                        alert.Dispose();
                    }
                };
                alert.Show();
            }
            else
            {
                var       PublicProfileBaseVC1 = UIStoryboard.FromName("PublicProfileBaseVC", NSBundle.MainBundle);
                EngelleVC controller           = PublicProfileBaseVC1.InstantiateViewController("EngelleVC") as EngelleVC;
                controller.BaseVC = this;
                controller.ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
                this.PresentViewController(controller, true, null);
            }
        }
Exemple #15
0
        void LokasyonRate(string Ratee)
        {
            WebService webService = new WebService();
            var        Donus      = webService.ServisIslem("locations/rating/" + gelenMekan.id, Ratee);

            if (Donus != "Hata")
            {
                CustomAlert.GetCustomAlert(this, "Değerlendirme için teşekkürler!");
                return;
            }
            else
            {
                CustomAlert.GetCustomAlert(this, "Bir sorun oluştu!");
                return;
            }
        }
Exemple #16
0
        void TokenAlDevamEt()
        {
            LoginRoot loginRoot = null;

            InvokeOnMainThread(delegate() {
                loginRoot = new LoginRoot()
                {
                    password   = SifreTxt.Text,
                    rememberMe = true,
                    username   = EmailTxt.Text,
                };
            });

            string     jsonString = JsonConvert.SerializeObject(loginRoot);
            WebService webService = new WebService();
            var        Donus      = webService.ServisIslem("authenticate", jsonString, true);

            if (Donus == "Hata")
            {
                CustomLoading.Hide();
                CustomAlert.GetCustomAlert(this, "Giriş Yapılamadı!");
                return;
            }
            else
            {
                JObject obj   = JObject.Parse(Donus);
                string  Token = (string)obj["id_token"];
                if (Token != null && Token != "")
                {
                    APITOKEN.TOKEN = Token;
                    if (GetMemberData())
                    {
                        CustomLoading.Hide();
                        InvokeOnMainThread(delegate() {
                            var appDelegate = UIApplication.SharedApplication.Delegate as AppDelegate;
                            appDelegate.SetRootLokasyonlarViewController();
                        });
                    }
                    else
                    {
                        CustomLoading.Hide();
                        CustomAlert.GetCustomAlert(this, "Bir sorun oluştu lütfen daha sonra tekrar deneyin.");
                        return;
                    }
                }
            }
        }
Exemple #17
0
 bool ControlUserAction()
 {
     if (isValidEmail(EmailTxt.Text) == false)
     {
         CustomAlert.GetCustomAlert(this, "Lütfen emalinizi kontrol edin!");
         return(false);
     }
     else if (SifreTxt.Text.Length < 6 == true)
     {
         CustomAlert.GetCustomAlert(this, "Şifreniz 6 karakterden az olamaz!");
         return(false);
     }
     else
     {
         return(true);
     }
 }
Exemple #18
0
        void KategoriyeGoreHediyeleriGetir()
        {
            var        MeID       = DataBase.MEMBER_DATA_GETIR()[0].id;
            WebService webService = new WebService();
            var        Donus      = webService.OkuGetir("locations/user/" + MeID);

            if (Donus != null)
            {
                var LokasyonCatids = Newtonsoft.Json.JsonConvert.DeserializeObject <EnSonLokasyonCategoriler>(Donus.ToString());
                if (LokasyonCatids.catIds.Count > 0)
                {
                    for (int i = 0; i < LokasyonCatids.catIds.Count; i++)
                    {
                        ResimleriGetir(LokasyonCatids.catIds[i].ToString());
                    }
                    if (GaleriDataModel1.Count > 0)
                    {
                        InvokeOnMainThread(() => {
                            CreateScrollView();
                        });
                        CustomLoading.Hide();
                    }
                    else
                    {
                        InvokeOnMainThread(() => {
                            CustomAlert.GetCustomAlert(this, "Hediye bulunamadı...");
                            this.DismissModalViewController(true);
                        });
                    }
                }
                else
                {
                    InvokeOnMainThread(() => {
                        CustomAlert.GetCustomAlert(this, "Hediye bulunamadı...");
                        this.DismissModalViewController(true);
                    });
                }
            }
            else
            {
                InvokeOnMainThread(() => {
                    CustomAlert.GetCustomAlert(this, "Hediye bulunamadı...");
                    this.DismissModalViewController(true);
                });
            }
        }
Exemple #19
0
 bool BosVarmi()
 {
     //textField.Text.Trim())
     if (string.IsNullOrEmpty(textField.Text.Trim()))
     {
         CustomAlert.GetCustomAlert(this, "Lütfen konuyu belirtin..");
         return(false);
     }
     else if (string.IsNullOrEmpty(MesajTextView.Text.Trim()))
     {
         CustomAlert.GetCustomAlert(this, "Lütfen mesajınızı belirtin..");
         return(false);
     }
     else
     {
         return(true);
     }
 }
Exemple #20
0
        void GirisYapMetod(string email, string sifre)
        {
            CustomLoading.Show(this, "Lütfen Bekleyin...");
            new System.Threading.Thread(new System.Threading.ThreadStart(delegate
            {
                WebService webService = new WebService();
                LoginRoot loginRoot   = null;
                InvokeOnMainThread(delegate() {
                    loginRoot = new LoginRoot()
                    {
                        password   = sifre,
                        rememberMe = true,
                        username   = email
                    };
                });

                string jsonString = JsonConvert.SerializeObject(loginRoot);
                var Donus         = webService.ServisIslem("authenticate", jsonString, true);
                if (Donus == "Hata")
                {
                    CustomLoading.Hide();
                    CustomAlert.GetCustomAlert(this, "Giriş Yapılamadı!");
                    return;
                }
                else
                {
                    JObject obj  = JObject.Parse(Donus);
                    string Token = (string)obj["id_token"];
                    if (Token != null && Token != "")
                    {
                        APITOKEN.TOKEN = Token;
                        if (GetMemberData())
                        {
                            CustomLoading.Hide();
                            InvokeOnMainThread(delegate() {
                                var appDelegate = UIApplication.SharedApplication.Delegate as AppDelegate;
                                appDelegate.SetRootLokasyonlarViewController();
                            });
                        }
                    }
                }
            })).Start();
        }
Exemple #21
0
        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;
            }
        }
Exemple #22
0
 bool BosVarmi()
 {
     if (EmailTxt.Text.Trim() == "")
     {
         CustomAlert.GetCustomAlert(this, "Lütfen Emailinizi Girin");
         return(false);
     }
     else
     {
         if (SifreTxt.Text.Trim() == "")
         {
             CustomAlert.GetCustomAlert(this, "Lütfen Şifrenizi yazın");
             return(false);
         }
         else
         {
             return(true);
         }
     }
 }
        public override void ViewDidAppear(bool animated)
        {
            base.ViewDidAppear(animated);
            //if (!Actinmi)
            //{
            //locationManager = new CLLocationManager();
            //locationManager.RequestWhenInUseAuthorization();
            //CustomMapView = new MKMapView() { ShowsUserLocation = true };
            var UserInfoVarmidur = DataBase.MEMBER_DATA_GETIR();

            if (UserInfoVarmidur.Count > 0)
            {
                if (new GetUserInformation().isActive())
                {
                    InvokeOnMainThread(delegate()
                    {
                        var appDelegate = UIApplication.SharedApplication.Delegate as AppDelegate;
                        appDelegate.SetRootLokasyonlarViewController();
                    });
                }
                else
                {
                    InvokeOnMainThread(delegate()
                    {
                        CustomAlert.GetCustomAlert(this, "Hesabınız pasifleştirildi.");
                        this.DismissViewController(true, null);
                    });
                }
            }
            else
            {
                InvokeOnMainThread(delegate()
                {
                    var appDelegate = UIApplication.SharedApplication.Delegate as AppDelegate;
                    appDelegate.SetRootSplashViewController();
                });
            }

            Actinmi = true;
            //}
        }
Exemple #24
0
        void GetLocation()
        {
            WebService         webService = new WebService();
            var                Donus      = webService.OkuGetir("users/location/" + GelenMekan.id + "/waiting");
            var                Donus2     = webService.OkuGetir("users/location/" + GelenMekan.id + "/online");
            List <MEMBER_DATA> List1      = new List <MEMBER_DATA>();
            List <MEMBER_DATA> List2      = new List <MEMBER_DATA>();
            List <MEMBER_DATA> Toplanmis  = new List <MEMBER_DATA>();
            var                MEDID      = DataBase.MEMBER_DATA_GETIR()[0].id;

            if (Donus != null)
            {
                var aa = Donus.ToString();
                List1 = Newtonsoft.Json.JsonConvert.DeserializeObject <List <MEMBER_DATA> >(Donus.ToString());
            }
            if (Donus2 != null)
            {
                var aa = Donus2.ToString();
                List2 = Newtonsoft.Json.JsonConvert.DeserializeObject <List <MEMBER_DATA> >(Donus2.ToString());
            }

            var l2 = List2.ToList();

            List1.AddRange(l2);

            LokasyondakiKisilerList = new List <MEMBER_DATA>();
            LokasyondakiKisilerList = List1.Where(p => p.id != -1).GroupBy(p => p.id).Select(grp => grp.FirstOrDefault()).ToList();
            LokasyondakiKisilerList = LokasyondakiKisilerList.FindAll(item => item.id != MEDID);
            if (LokasyondakiKisilerList.Count > 0)
            {
                FilterUsers();
                SuperBoostKullaniminaGoreSirala();
                FillDataModel();
            }
            else
            {
                CustomAlert.GetCustomAlert(gelenbase, "Henüz bu lokasyonda kimse bulunamıyor...");
                CustomLoading.Hide();
            }
        }
Exemple #25
0
        void SonMesajlariGetir()
        {
            WebService webService = new WebService();
            var        Donus      = webService.OkuGetir("chats/user");

            if (Donus != null)
            {
                var MeID = DataBase.MEMBER_DATA_GETIR()[0].id;
                var aa   = Donus.ToString();
                mFriends = Newtonsoft.Json.JsonConvert.DeserializeObject <List <MesajKisileri> >(Donus.ToString());
                mFriends = mFriends.FindAll(item => item.request == true);
                if (mFriends.Count > 0)
                {
                    mFriends.Where(item => item.receiverId == MeID).ToList().ForEach(item2 => item2.unreadMessageCount = 0);
                    SaveKeys();
                    SonMesajKiminKontrolunuYap();
                    InvokeOnMainThread(() =>
                    {
                        //Geçmiş gelecekten daha büyüktür
                        mFriends.Sort((x, y) => DateTime.Compare(x.lastModifiedDate, y.lastModifiedDate));
                        mFriends.Reverse();
                        Tablo.Source = new MesajlarCustomTableCellSoruce(mFriends, this, FavorileriCagir());
                        Tablo.ReloadData();
                        Tablo.SeparatorStyle  = UITableViewCellSeparatorStyle.None;
                        Tablo.TableFooterView = new UIView();
                        CustomLoading.Hide();
                        BoostUygula();
                    });
                }
                else
                {
                    CustomAlert.GetCustomAlert(GelenBase1, "Hiç Mesaj Bulunamadı...");
                    CustomLoading.Hide();
                }
            }
            else
            {
                CustomLoading.Hide();
            }
        }
Exemple #26
0
        private void OkButon_TouchUpInside(object sender, EventArgs e)
        {
            var MinValue = Math.Round(rangeSlider.LowerValue, 0);
            var MaxValue = Math.Round(rangeSlider.UpperValue, 0);

            maxText.Text = MinValue.ToString() + " - " + MaxValue.ToString();
            FILTRELER fILTRELER = new FILTRELER()
            {
                Cinsiyet = SonCinsiyetSecim,
                minAge   = (int)Math.Round(Convert.ToDouble(MinValue), 0),
                maxAge   = (int)Math.Round(Convert.ToDouble(MaxValue), 0)
            };

            if (DataBase.FILTRELER_TEMIZLE())
            {
                if (DataBase.FILTRELER_EKLE(fILTRELER))
                {
                    //CustomAlert.GetCustomAlert(this, "Filtreler kaydedildi.");
                    this.View.BackgroundColor = UIColor.Clear;
                    Task.Run(delegate()
                    {
                        InvokeOnMainThread(delegate()
                        {
                            SlideVerticaly(FilterTabView, false, true);
                            this.DismissViewController(true, null);
                        });
                    });
                }
                else
                {
                    CustomAlert.GetCustomAlert(this, "Bir sorun oluştu.");
                }
            }
            else
            {
                CustomAlert.GetCustomAlert(this, "Bir sorun oluştu.");
            }
        }
Exemple #27
0
        private void KayitOlButton_TouchUpInside(object sender, EventArgs e)
        {
            if (BosVarmi())
            {
                if (ControlUserAction())
                {
                    CustomLoading.Show(this, "Lütfen Bekleyin...");
                    new System.Threading.Thread(new System.Threading.ThreadStart(delegate
                    {
                        WebService webService       = new WebService();
                        KayitIcinRoot kayitIcinRoot = null;
                        InvokeOnMainThread(delegate() {
                            kayitIcinRoot = new KayitIcinRoot()
                            {
                                firstName = AdText.Text.Trim(),
                                lastName  = SoyadText.Text.Trim(),
                                password  = SifreTxt.Text,
                                login     = EmailTxt.Text,
                                email     = EmailTxt.Text
                            };
                        });

                        string jsonString = JsonConvert.SerializeObject(kayitIcinRoot);
                        var Responsee     = webService.ServisIslem("register", jsonString, true);
                        if (Responsee != "Hata")
                        {
                            TokenAlDevamEt();
                        }
                        else
                        {
                            CustomLoading.Hide();
                            CustomAlert.GetCustomAlert(this, " Bir sorun oluştu lütfen internet bağlantınızı kontrol edin.");
                            return;
                        }
                    })).Start();
                }
            }
        }
Exemple #28
0
        public void SetPhoto(UIImage impath)
        {
            string _base64String;
            NSData imageData = impath.AsJPEG(compressionQuality: 0.1f);

            _base64String = imageData.GetBase64EncodedString(NSDataBase64EncodingOptions.None);

            var UserId = DataBase.MEMBER_DATA_GETIR()[0].id;
            GalleryDataModel fotografEkleDataModel = new GalleryDataModel()
            {
                imagePath        = _base64String,
                userId           = UserId,
                createdDate      = DateTime.Now.ToString("yyyy-MM-dd'T'HH:mm:ssZ"),
                lastModifiedDate = DateTime.Now.ToString("yyyy-MM-dd'T'HH:mm:ssZ")
            };

            WebService webService = new WebService();
            string     jsonString = JsonConvert.SerializeObject(fotografEkleDataModel);
            var        Donus      = webService.ServisIslem("images", jsonString);

            if (Donus != "Hata")
            {
                for (int i = 0; i < Noktalar.Length; i++)
                {
                    Noktalar[i].RemoveFromSuperview();
                }
                GetPhotos();
                CreateScrollViews();
                CustomLoading.Hide();
                GenelBase.GetUserImage(UserId);
            }
            else
            {
                CustomAlert.GetCustomAlert(this, "Fotoğraf Yüklenemedi!...");
                CustomLoading.Hide();
            }
        }
Exemple #29
0
        void GetUserInfo(string UserID, string keyy)
        {
            WebService webService = new WebService();
            var        Donus2     = webService.OkuGetir("blocked-user/block-list");

            if (Donus2 != null)
            {
                var EngelliKul = Newtonsoft.Json.JsonConvert.DeserializeObject <List <EngelliKullanicilarDTO> >(Donus2.ToString());

                if (EngelliKul.Count > 0)
                {
                    InvokeOnMainThread(delegate()
                    {
                        Engelliler = EngelliKul[0].blockUserId;
                    });
                }
            }
            var Donus = webService.OkuGetir("users/" + UserID);

            if (Donus != null)
            {
                var Userrr = Newtonsoft.Json.JsonConvert.DeserializeObject <MEMBER_DATA>(Donus.ToString());
                MesajlarIcinSecilenKullanici.Kullanici = Userrr;
                MesajlarIcinSecilenKullanici.key       = keyy;
                if (Engelliler == Userrr.id)
                {
                    CustomAlert.GetCustomAlert(GelenBase1, "Bu kullanıcıyı engellediğiniz için mesaj atamazsınız!");
                }
                else
                {
                    var    LokasyonKisilerStory = UIStoryboard.FromName("MesajlarBaseVC", NSBundle.MainBundle);
                    ChatVC controller           = LokasyonKisilerStory.InstantiateViewController("ChatVC") as ChatVC;
                    controller.ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
                    this.GelenBase1.PresentViewController(controller, true, null);
                }
            }
        }
Exemple #30
0
 void BizeYazinGonder()
 {
     if (BosVarmi())
     {
         var        Me         = DataBase.MEMBER_DATA_GETIR()[0];
         WebService webService = new WebService();
         ContactDTO contactDTO = new ContactDTO()
         {
             text   = MesajTextView.Text,
             topic  = textField.Text,
             userId = Me.id
         };
         string jsonString = JsonConvert.SerializeObject(contactDTO);
         var    Donus      = webService.ServisIslem("contacts", jsonString);
         if (Donus != "Hata")
         {
             var alert = new UIAlertView();
             alert.Title = "Buptis";
             alert.AddButton("Tamam");
             alert.Message        = "Destek talebiniz iletildi. Teşekkürler...";
             alert.AlertViewStyle = UIAlertViewStyle.Default;
             alert.Clicked       += (object s, UIButtonEventArgs ev) =>
             {
                 alert.Dispose();
                 this.DismissViewController(true, null);
             };
             alert.Show();
             textField.Text     = "";
             MesajTextView.Text = "";
         }
         else
         {
             CustomAlert.GetCustomAlert(this, "Bir sorun oluştu...");
             return;
         }
     }
 }