Пример #1
0
 public MuaPage(JObject jObj)
 {
     this.BackgroundColor = Color.White;
     Utils.SetupPage(this);
     mua = new MuaArtist(jObj, true);
     BuildLayout();
 }
Пример #2
0
        private void OnSendReviewClick(object sender, EventArgs arg)
        {
            var spinner = UIUtils.ShowSpinner(this);
            int rating  = Convert.ToInt32(reviewRating.Rating);

            DataGate.SendReview(mua.Id, GlobalStorage.Settings.CustomerId, rating, reviewEntry.Text, (res) =>
            {
                if (res.Code == ResponseCode.OK && res.Result.ToString() == "true")
                {
                    DataGate.GetMua(mua.Id, (data) =>
                    {
                        if (data.Code == ResponseCode.OK)
                        {
                            mua = new MuaArtist(JObject.Parse(data.Result), true);
                        }
                        DataGate.CanWriteReview(mua.Id, GlobalStorage.Settings.CustomerId, data2 =>
                        {
                            CanSendReview = (data2.Code == ResponseCode.OK && data2.Result == "true");
                            UIUtils.HideSpinner(this, spinner);
                            Device.BeginInvokeOnMainThread(() =>
                            {
                                BuildReview();
                            });
                        });
                    });
                }
                else
                {
                    UIUtils.ShowMessage("Review send fail. Try later", this);
                    UIUtils.HideSpinner(this, spinner);
                }
            });
        }
Пример #3
0
 public MuaProfilePage(JObject jObj)
 {
     BackgroundColor = Color.White;
     Utils.SetupPage(this);
     _mua        = new MuaArtist(jObj, true);
     _mua.Images = _mua.Images.Where(s => !string.IsNullOrWhiteSpace(s)).ToList();
     BuildLayout();
 }
Пример #4
0
        public MuaAccountPage(JObject jObj)
        {
            Utils.SetupPage(this);
            this.BackgroundColor = Color.White;
            Client client = new MuaArtist(jObj, true);

            BuildLayout(client);
            AddSideMenu();
        }
Пример #5
0
        public static void MuaSetInfo(MuaArtist mua, Action <ResponseDataJson> callback)
        {
            var jObj = new JObject();

            jObj["Id"]           = mua.Id;
            jObj["FirstName"]    = mua.FirstName;
            jObj["LastName"]     = mua.LastName;
            jObj["BusinessName"] = mua.BusinessName;
            jObj["Phone"]        = mua.PhoneNumber;
            jObj["Address"]      = mua.Address;
            jObj["LocationLat"]  = mua.Lat;
            jObj["LocationLon"]  = mua.Lon;
            jObj["AboutMe"]      = mua.AboutMe;
            MakeRequestJson("mua/setinfo", jObj.ToString(), callback);
        }