protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            commonDetails = JsonConvert.DeserializeObject <CommonDetails>(Intent.GetStringExtra("details"));

            lblHeader                   = FindViewById <TextView>(Resource.Id.lblheader);
            linearProgressBar           = FindViewById <LinearLayout>(Resource.Id.linearProgressBar);
            btnSubmit                   = FindViewById <Button>(Resource.Id.btnSubmit);
            enquiryUserFeedbackListView = FindViewById <ListView>(Resource.Id.lstEnquiryUserFollowUpList);

            //for regular text getting Montserrat-Light.otf
            Typeface face = Typeface.CreateFromAsset(Application.Context.Assets, "fonts/zekton rg.ttf");

            lblHeader.SetTypeface(face, TypefaceStyle.Bold);
            btnSubmit.SetTypeface(face, TypefaceStyle.Normal);

            btnSubmit.SetAllCaps(false);

            linearProgressBar.Visibility = Android.Views.ViewStates.Visible;

            new Thread(new ThreadStart(delegate
            {
                RunOnUiThread(async() =>
                {
                    await LoadEnquiryUserDetails(commonDetails);
                    linearProgressBar.Visibility = Android.Views.ViewStates.Gone;
                });
            })).Start();
        }
        public async Task LoadCourt(int position, CommonDetails details)
        {
            details.SportId = _items[position].SportId.ToString();
            //var intent = new Intent(context, typeof(CourtActivity));
            //intent.PutExtra("details", JsonConvert.SerializeObject(commonDetails));
            //context.StartActivity(intent);
            //ViewCourtFirstClick = false;

            if (helper.CheckInternetConnection(context))
            {
                try
                {
                    CheckLandingPage(details);
                    progress.Visibility = Android.Views.ViewStates.Gone;
                }
                catch (Exception e)
                {
                    helper.AlertPopUp("Error", "Unable to retrive data the server", context);
                    progress.Visibility = Android.Views.ViewStates.Gone;
                }
            }
            else
            {
                helper.AlertPopUp("Warning", "Please enable mobile data", context);
                progress.Visibility = Android.Views.ViewStates.Gone;
            }
        }
Exemple #3
0
 public Game_ItemAdapter(Activity context, IList <Games> items, LinearLayout progressbar, CommonDetails details) : base()
 {
     this.context  = context;
     this._items   = items;
     progress      = progressbar;
     commonDetails = details;
 }
Exemple #4
0
 public GridBatchAdpater(Activity context, IList <BatchCountModel> items, LinearLayout progressbar, CommonDetails details) : base()
 {
     this.context  = context;
     this._items   = items;
     progress      = progressbar;
     commonDetails = details;
 }
Exemple #5
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            commonDetails = JsonConvert.DeserializeObject <CommonDetails>(Intent.GetStringExtra("details"));

            sportListView     = FindViewById <ListView>(Resource.Id.lstSport);
            lblHeader         = FindViewById <TextView>(Resource.Id.lblheader);
            linearProgressBar = FindViewById <LinearLayout>(Resource.Id.linearProgressBar);

            //for regular text getting Montserrat-Light.otf
            Typeface face = Typeface.CreateFromAsset(Application.Context.Assets, "fonts/zekton rg.ttf");

            lblHeader.SetTypeface(face, TypefaceStyle.Bold);


            linearProgressBar.Visibility = ViewStates.Visible;
            new Thread(new ThreadStart(delegate
            {
                RunOnUiThread(async() =>
                {
                    await LoadSport(commonDetails);
                });
            })).Start();
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            commonDetails = JsonConvert.DeserializeObject <CommonDetails>(Intent.GetStringExtra("details"));

            attendancelistView   = FindViewById <ListView>(Resource.Id.lstAttendanceAddPlayer);
            lblHeader            = FindViewById <TextView>(Resource.Id.lblheader);
            linearProgressBar    = FindViewById <LinearLayout>(Resource.Id.linearProgressBar);
            btnDone              = FindViewById <Button>(Resource.Id.btnDone);
            txtSearchPlayers     = FindViewById <TextView>(Resource.Id.txtSearchPlayers);
            editTextSearchPlayer = FindViewById <EditText>(Resource.Id.editTextSearchPlayer);

            //for regular text getting Montserrat - Light.otf
            Typeface face = Typeface.CreateFromAsset(Application.Context.Assets, "fonts/zekton rg.ttf");

            lblHeader.SetTypeface(face, TypefaceStyle.Bold);
            btnDone.SetTypeface(face, TypefaceStyle.Bold);
            txtSearchPlayers.SetTypeface(face, TypefaceStyle.Normal);
            editTextSearchPlayer.SetTypeface(face, TypefaceStyle.Bold);

            btnDone.SetAllCaps(false);

            btnDone.Click += btnDone_Click;
            editTextSearchPlayer.TextChanged += EditTextSearchPlayer_TextChanged;


            linearProgressBar.Visibility = ViewStates.Visible;
            new Thread(new ThreadStart(delegate { RunOnUiThread(async() => { await LoadAttendanceAddPlayer(commonDetails); }); }))
            .Start();
        }
        private async Task LoadAttendanceAddPlayer(CommonDetails details)
        {
            ServiceHelper serviceHelper = new ServiceHelper();

            if (helper.CheckInternetConnection(this))
            {
                try
                {
                    playerList = serviceHelper.GetPlayerForAddingToAttendance(details.access_token, details.VenueId, details.SportId);


                    if (playerList != null && playerList.Count > 0)
                    {
                        attendanceAddPlayer_ItemAdapter =
                            new AttendanceAddPlayer_ItemAdapter(this, playerList, linearProgressBar);

                        attendancelistView.Adapter = attendanceAddPlayer_ItemAdapter;
                    }

                    linearProgressBar.Visibility = Android.Views.ViewStates.Gone;
                }
                catch (Exception e)
                {
                    helper.AlertPopUp("Error", "Unable to retrive data the server", this);
                    linearProgressBar.Visibility = Android.Views.ViewStates.Gone;
                }
            }
            else
            {
                helper.AlertPopUp("Warning", "Please enable mobile data", this);
                linearProgressBar.Visibility = Android.Views.ViewStates.Gone;
            }
        }
        public void BindVenue(CommonDetails details)
        {
            try
            {
                isInternetConnection = false;
                if (helper.CheckInternetConnection(this))
                {
                    ServiceHelper serviceHelper = new ServiceHelper();

                    List <Venue> venueList = new List <Venue>();
                    venueList = serviceHelper.GetVenue(details.access_token);
                    linearProgressBar.Visibility = Android.Views.ViewStates.Gone;

                    venueListView.SetAdapter(new Venue_ItemAdapter(this, venueList, linearProgressBar, details));
                }
                else
                {
                    helper.AlertPopUp("Warning", "Please enable mobile data", this);
                }
            }
            catch (Exception e)
            {
                helper.AlertPopUp("Error", "Unable to retrive data the server", this);
            }
        }
        private async Task LoadBatches(CommonDetails details)
        {
            if (helper.CheckInternetConnection(this))
            {
                try
                {
                    ServiceHelper serviceHelper = new ServiceHelper();

                    List <BatchCountModel> batchList = new List <BatchCountModel>();
                    batchList = serviceHelper.GetBatch(details.access_token, details.VenueId, details.SportId,
                                                       details.CourtId);

                    adapter = new GridBatchAdpater(this, batchList, linearProgressBar, details);
                    grdView.SetAdapter(adapter);
                }
                catch (Exception e)
                {
                    helper.AlertPopUp("Error", "Unable to retrive data the server", this);
                    linearProgressBar.Visibility = Android.Views.ViewStates.Gone;
                }
            }
            else
            {
                helper.AlertPopUp("Warning", "Please enable mobile data", this);
                linearProgressBar.Visibility = Android.Views.ViewStates.Gone;
            }
        }
        public async Task LoadVenue(int position, CommonDetails details)
        {
            details.VenueId   = _items[position].VenueId.ToString();
            details.VenueCode = _items[position].VenueCode.ToString();

            ISharedPreferences       pref = Application.Context.GetSharedPreferences("VenueCodeDetail", FileCreationMode.Private);
            ISharedPreferencesEditor edit = pref.Edit();

            edit.PutString("venueCode", details.VenueCode);
            edit.Apply();

            if (helper.CheckInternetConnection(context))
            {
                try
                {
                    CheckLandingPage(details);
                    progress.Visibility = Android.Views.ViewStates.Gone;
                }
                catch (Exception e)
                {
                    helper.AlertPopUp("Error", "Unable to retrive data the server", context);
                    progress.Visibility = Android.Views.ViewStates.Gone;
                }
            }
            else
            {
                helper.AlertPopUp("Warning", "Please enable mobile data", context);
                progress.Visibility = Android.Views.ViewStates.Gone;
            }
        }
Exemple #11
0
 public EnquiryFeedback_ItemAdapter(Activity context, IList<EnquiryFeedback> items, LinearLayout progressbar, CommonDetails details) : base()
 {
     this.context = context;
     this._items = items;
     progress = progressbar;
     commonDetails = details;
 }
Exemple #12
0
        public void LoadBatches()
        {
            commonDetails = GetDetails();
            commonDetails.isAttendance = false;
            if (helper.CheckInternetConnection(this))
            {
                try
                {
                    //CheckLandingPage(commonDetails);
                    Intent intent = new Intent(this, typeof(SportActivity));
                    intent.PutExtra("details", JsonConvert.SerializeObject(commonDetails));
                    //close all the other intent
                    StartActivity(intent);
                }
                catch (Exception e)
                {
                    helper.AlertPopUp("Error", "Unable to retrive data the server", this);
                }
            }
            else
            {
                helper.AlertPopUp("Warning", "Please enable mobile data", this);
            }

            //commonDetails = GetDetails();
            //Intent intent = new Intent(this, typeof(SportActivity));
            //intent.PutExtra("details", JsonConvert.SerializeObject(commonDetails));
            ////close all the other intent
            //StartActivity(intent);
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Venues);

            //isLogin = Intent.GetStringExtra("isLogin") ?? "0";
            //if (isLogin == "1")
            //{
            commonDetails = JsonConvert.DeserializeObject <CommonDetails>(Intent.GetStringExtra("details"));
            //}
            //else
            //{
            //    commonDetails=new CommonDetails();
            //    ISharedPreferences pref = Application.Context.GetSharedPreferences("LoggedUserDetails", FileCreationMode.Private);
            //    commonDetails.access_token = pref.GetString("access_token", string.Empty);
            //    commonDetails.ExpireTime = pref.GetString("expires_in", string.Empty);
            //    commonDetails.refreshToken = pref.GetString("refresh_token", string.Empty);
            //}

            venueListView     = FindViewById <ListView>(Resource.Id.lstVenue);
            lblAppname        = FindViewById <TextView>(Resource.Id.lblAppname);
            lblHeader         = FindViewById <TextView>(Resource.Id.lblheader);
            linearProgressBar = FindViewById <LinearLayout>(Resource.Id.linearProgressBar);

            //for regular text getting Montserrat-Light.otf
            Typeface face = Typeface.CreateFromAsset(Application.Context.Assets, "fonts/zekton rg.ttf");

            lblAppname.SetTypeface(face, TypefaceStyle.Bold);
            lblHeader.SetTypeface(face, TypefaceStyle.Bold);

            ////action bar items enabling(Top Bar)
            ActionBar.SetDisplayHomeAsUpEnabled(true);
            ActionBar.SetHomeButtonEnabled(true);
            ActionBar.SetDisplayShowHomeEnabled(true);

            ////Hide the Application icon
            ActionBar.SetIcon(new ColorDrawable(Resources.GetColor(Android.Resource.Color.Transparent)));

            ActionBar.SetBackgroundDrawable(new ColorDrawable(Color.ParseColor("#708090")));

            ActionBar.LayoutParams navBarParams = new ActionBar.LayoutParams(
                ActionBar.LayoutParams.WrapContent,
                ActionBar.LayoutParams.WrapContent,
                GravityFlags.Center);

            var inflater = Application.Context.GetSystemService(Context.LayoutInflaterService) as LayoutInflater;

            View customView = inflater.Inflate(Resource.Layout.CustomActionBar, null);

            ActionBar.SetCustomView(customView, navBarParams);

            ActionBar.SetDisplayShowCustomEnabled(true);

            ActionBar.Hide();

            BindVenue(commonDetails);
        }
Exemple #14
0
        public void LoadEnquiryUser()
        {
            commonDetails = GetDetails();
            commonDetails.isAttendance = false;
            Intent intent = new Intent(this, typeof(EnquiryUserActivity));

            intent.PutExtra("details", JsonConvert.SerializeObject(commonDetails));
            //close all the other intent
            StartActivity(intent);
        }
Exemple #15
0
 public async Task LoadEnquiryUserDetails(int position, CommonDetails details)
 {
     if (helper.CheckInternetConnection(context))
     {
         var intent = new Intent(context, typeof(EnquiryUserDetailActivity));
         intent.PutExtra("details", JsonConvert.SerializeObject(commonDetails));
         context.StartActivity(intent);
     }
     else
     {
         helper.AlertPopUp("Warning", "Please enable mobile data", context);
     }
 }
Exemple #16
0
 public async Task LoadPlayer(int position, CommonDetails details)
 {
     if (helper.CheckInternetConnection(context))
     {
         details.BatchId = _items[position].BatchId.ToString();
         var intent = new Intent(context, typeof(BatchPlayer));
         intent.PutExtra("details", JsonConvert.SerializeObject(commonDetails));
         context.StartActivity(intent);
         ViewBatchFirstClick = false;
     }
     else
     {
         helper.AlertPopUp("Warning", "Please enable mobile data", context);
     }
 }
Exemple #17
0
        public async Task BindGame(CommonDetails details)
        {
            if (helper.CheckInternetConnection(this))
            {
                try
                {
                    ServiceHelper serviceHelper = new ServiceHelper();

                    gameList = serviceHelper.GetGames(details.access_token, details.VenueId, details.SportId);

                    if (gameList != null && gameList.Count > 0)
                    {
                        //List<String> sportNameList = new List<String>();
                        //sportNameList.Add("Select");
                        //foreach (var name in gameList)
                        //{
                        //    sportNameList.Add(name.SportName);

                        //}


                        game_ItemAdapter =
                            new Game_ItemAdapter(this, gameList, linearProgressBar, details);

                        gameListView.Adapter = game_ItemAdapter;
                    }

                    linearProgressBar.Visibility = Android.Views.ViewStates.Gone;
                }
                catch (Exception e)
                {
                    helper.AlertPopUp("Error", "Unable to retrive data the server", this);

                    linearProgressBar.Visibility = Android.Views.ViewStates.Gone;
                }
            }
            else
            {
                helper.AlertPopUp("Warning", "Please enable mobile data", this);

                linearProgressBar.Visibility = Android.Views.ViewStates.Gone;
            }
        }
        public void CheckLandingPage(CommonDetails details)
        {
            ServiceHelper serviceHelper;

            serviceHelper = new ServiceHelper();

            List <Court>           courtList = new List <Court>();
            List <BatchCountModel> batchList = new List <BatchCountModel>();

            courtList = serviceHelper.GetCourt(details.access_token, details.VenueId, details.SportId);
            if (courtList != null && courtList.Count > 0)
            {
                if (courtList.Count > 1)
                {
                    var courtIntent = new Intent(context, typeof(CourtActivity));
                    courtIntent.PutExtra("details", JsonConvert.SerializeObject(details));
                    context.StartActivity(courtIntent);
                    context.Finish();
                }
                else
                {
                    serviceHelper = new ServiceHelper();

                    details.CourtId = courtList[0].CourtId.ToString();

                    batchList = serviceHelper.GetBatch(details.access_token, details.VenueId, details.SportId, details.CourtId);

                    var batchesIntent = new Intent(context, typeof(BatchesActivity));
                    batchesIntent.PutExtra("details", JsonConvert.SerializeObject(details));
                    context.StartActivity(batchesIntent);
                    context.Finish();
                }
            }
            else
            {
                helper.AlertPopUp("Warning", "There are no court available", context);
                progress.Visibility = Android.Views.ViewStates.Gone;
            }
        }
Exemple #19
0
        public async Task LoadPlayer(CommonDetails details, DateTime selecteDateTime)
        {
            if (helper.CheckInternetConnection(this))
            {
                try
                {
                    ServiceHelper serviceHelper = new ServiceHelper();

                    if (details.isAttendance)
                    {
                        playerList = serviceHelper.GetPlayerForAttendance(details.access_token, details.VenueId, details.SportId,
                                                                          details.CourtId, details.BatchId, "0", selecteDateTime.ToString("MM-dd-yyyy"));
                    }
                    else
                    {
                        playerList = serviceHelper.GetPlayer(details.access_token, details.VenueId, details.SportId,
                                                             details.CourtId, details.BatchId);
                    }

                    batchPlayer_ItemAdapter =
                        new BatchPlayer_ItemAdapter(this, playerList, linearProgressBar, details.isAttendance);

                    batchPlayerListView.Adapter  = batchPlayer_ItemAdapter;
                    linearProgressBar.Visibility = Android.Views.ViewStates.Gone;
                }
                catch (Exception e)
                {
                    helper.AlertPopUp("Error", "Unable to retrive data the server", this);

                    linearProgressBar.Visibility = Android.Views.ViewStates.Gone;
                }
            }
            else
            {
                helper.AlertPopUp("Warning", "Please enable mobile data", this);

                linearProgressBar.Visibility = Android.Views.ViewStates.Gone;
            }
        }
Exemple #20
0
        private async Task LoadCourt(CommonDetails details)
        {
            ServiceHelper serviceHelper = new ServiceHelper();

            if (helper.CheckInternetConnection(this))
            {
                try
                {
                    List <Court> courtList = new List <Court>();
                    courtList = serviceHelper.GetCourt(details.access_token, details.VenueId, details.SportId);


                    //linearProgressBar.Visibility = Android.Views.ViewStates.Visible;
                    //new Thread(new ThreadStart(delegate
                    //{
                    //    RunOnUiThread(async () => { await LoadCourt(); linearProgressBar.Visibility = Android.Views.ViewStates.Gone; });
                    //})).Start();


                    if (courtList != null && courtList.Count > 0)
                    {
                        courtListView.SetAdapter(new Court_ItemAdapter(this, courtList, linearProgressBar, details));
                    }

                    linearProgressBar.Visibility = Android.Views.ViewStates.Gone;
                }
                catch (Exception e)
                {
                    helper.AlertPopUp("Error", "Unable to retrive data the server", this);
                    linearProgressBar.Visibility = Android.Views.ViewStates.Gone;
                }
            }
            else
            {
                helper.AlertPopUp("Warning", "Please enable mobile data", this);
                linearProgressBar.Visibility = Android.Views.ViewStates.Gone;
            }
        }
Exemple #21
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);


            //isLogin = Intent.GetStringExtra("isLogin") ?? "0";
            //if (isLogin == "1")
            //{
            commonDetails = JsonConvert.DeserializeObject <CommonDetails>(Intent.GetStringExtra("details"));
            //}
            //else
            //{
            //    commonDetails=new CommonDetails();
            //    ISharedPreferences pref = Application.Context.GetSharedPreferences("LoggedUserDetails", FileCreationMode.Private);
            //    commonDetails.access_token = pref.GetString("access_token", string.Empty);
            //    commonDetails.ExpireTime = pref.GetString("expires_in", string.Empty);
            //    commonDetails.refreshToken = pref.GetString("refresh_token", string.Empty);
            //}

            gameListView      = FindViewById <ListView>(Resource.Id.lstGames);
            lblHeader         = FindViewById <TextView>(Resource.Id.lblheader);
            linearProgressBar = FindViewById <LinearLayout>(Resource.Id.linearProgressBar);
            btnDone           = FindViewById <Button>(Resource.Id.btnDone);

            //for regular text getting Montserrat-Light.otf
            Typeface face = Typeface.CreateFromAsset(Application.Context.Assets, "fonts/zekton rg.ttf");


            lblHeader.SetTypeface(face, TypefaceStyle.Bold);

            linearProgressBar.Visibility = ViewStates.Visible;
            new Thread(new ThreadStart(delegate { RunOnUiThread(async() => { await BindGame(commonDetails); }); }))
            .Start();

            btnDone.Click += btnDone_Click;
        }
Exemple #22
0
        private async Task LoadEnquiryList(CommonDetails details)
        {
            ServiceHelper serviceHelper = new ServiceHelper();

            if (helper.CheckInternetConnection(this))
            {
                try
                {
                    enquiryModelList = serviceHelper.GetEnquiry(details.access_token);

                    linearProgressBar.Visibility = Android.Views.ViewStates.Gone;
                }
                catch (Exception e)
                {
                    helper.AlertPopUp("Error", "Unable to retrive data the server", this);
                    linearProgressBar.Visibility = Android.Views.ViewStates.Gone;
                }
            }
            else
            {
                helper.AlertPopUp("Warning", "Please enable mobile data", this);
                linearProgressBar.Visibility = Android.Views.ViewStates.Gone;
            }
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            commonDetails = JsonConvert.DeserializeObject <CommonDetails>(Intent.GetStringExtra("details"));

            lblHeader              = FindViewById <TextView>(Resource.Id.lblheader);
            linearProgressBar      = FindViewById <LinearLayout>(Resource.Id.linearProgressBar);
            btnSubmit              = FindViewById <Button>(Resource.Id.btnSubmit);
            btnCancel              = FindViewById <Button>(Resource.Id.btnCancel);
            spinnerEnquiryGame     = FindViewById <Spinner>(Resource.Id.spinnerEnquiryGame);
            editTextEnquiryGames   = FindViewById <EditText>(Resource.Id.editTextEnquiryGames);
            editTextEnquiryName    = FindViewById <EditText>(Resource.Id.editTextEnquiryName);
            editTextEnquiryMobile  = FindViewById <EditText>(Resource.Id.editTextEnquiryMobile);
            editTextEnquiryComment = FindViewById <EditText>(Resource.Id.editTextEnquiryComment);

            txtEnquiryName             = FindViewById <TextView>(Resource.Id.txtEnquiryName);
            txtEnquiryMobile           = FindViewById <TextView>(Resource.Id.txtEnquiryMobile);
            txtEnquiryGame             = FindViewById <TextView>(Resource.Id.txtEnquiryGame);
            txtEnquiryComment          = FindViewById <TextView>(Resource.Id.txtEnquiryComment);
            llEnquiryFeedbackContainer = FindViewById <LinearLayout>(Resource.Id.llEnquiryFeedbackContainer);
            //llEnquiryFeedback = FindViewById<LinearLayout>(Resource.Id.llEnquiryFeedback);


            //for regular text getting Montserrat-Light.otf
            Typeface face = Typeface.CreateFromAsset(Application.Context.Assets, "fonts/zekton rg.ttf");

            lblHeader.SetTypeface(face, TypefaceStyle.Bold);
            btnSubmit.SetTypeface(face, TypefaceStyle.Normal);
            btnCancel.SetTypeface(face, TypefaceStyle.Normal);

            editTextEnquiryName.SetTypeface(face, TypefaceStyle.Normal);
            editTextEnquiryMobile.SetTypeface(face, TypefaceStyle.Normal);
            editTextEnquiryGames.SetTypeface(face, TypefaceStyle.Normal);
            editTextEnquiryComment.SetTypeface(face, TypefaceStyle.Normal);
            txtEnquiryName.SetTypeface(face, TypefaceStyle.Normal);
            txtEnquiryMobile.SetTypeface(face, TypefaceStyle.Normal);
            txtEnquiryGame.SetTypeface(face, TypefaceStyle.Normal);
            txtEnquiryComment.SetTypeface(face, TypefaceStyle.Normal);



            btnSubmit.SetAllCaps(false);
            btnCancel.SetAllCaps(false);

            btnSubmit.Click            += btnSubmit_Click;
            btnCancel.Click            += btnCancel_Click;
            editTextEnquiryGames.Click += EditTextEnquiryGames_Click;

            LinearLayout ll    = new LinearLayout(this);
            var          param = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent,
                                                               ViewGroup.LayoutParams.WrapContent);

            TextView commentTextView;

            for (int i = 0; i < 2; i++)
            {
                commentTextView = new TextView(this)
                {
                    Id = i
                };

                commentTextView.SetText("Comment1", TextView.BufferType.Normal);
                commentTextView.SetTextSize(ComplexUnitType.Dip, 15);
                commentTextView.SetTextColor(Color.ParseColor("#000000"));
                ll.AddView(commentTextView, param);
            }

            llEnquiryFeedbackContainer.AddView(ll);

            //linearProgressBar.Visibility = Android.Views.ViewStates.Visible;

            //new Thread(new ThreadStart(delegate
            //{
            //    RunOnUiThread(async () =>
            //    {
            //        await LoadGames(commonDetails);
            //        linearProgressBar.Visibility = Android.Views.ViewStates.Gone;
            //    });
            //})).Start();
        }
        public async Task LoadEnquiryUserDetails(CommonDetails details)
        {
            if (helper.CheckInternetConnection(this))
            {
                List <EnquiryFeedback> enquiryFeedbackList = new List <EnquiryFeedback>();
                EnquiryFeedback        enquiryFeedback;

                enquiryFeedback         = new EnquiryFeedback();
                enquiryFeedback.Date    = "01/01/2018";
                enquiryFeedback.Comment = "Comment 1";

                enquiryFeedbackList.Add(enquiryFeedback);

                enquiryFeedback         = new EnquiryFeedback();
                enquiryFeedback.Date    = "01/01/2018";
                enquiryFeedback.Comment = "Comment 1";

                enquiryFeedbackList.Add(enquiryFeedback);

                enquiryFeedback         = new EnquiryFeedback();
                enquiryFeedback.Date    = "01/01/2018";
                enquiryFeedback.Comment = "Comment 1";

                enquiryFeedbackList.Add(enquiryFeedback);

                enquiryFeedback         = new EnquiryFeedback();
                enquiryFeedback.Date    = "01/01/2018";
                enquiryFeedback.Comment = "Comment 1";

                enquiryFeedbackList.Add(enquiryFeedback);

                enquiryFeedback         = new EnquiryFeedback();
                enquiryFeedback.Date    = "01/01/2018";
                enquiryFeedback.Comment = "Comment 1";

                enquiryFeedbackList.Add(enquiryFeedback);

                enquiryFeedback         = new EnquiryFeedback();
                enquiryFeedback.Date    = "01/01/2018";
                enquiryFeedback.Comment = "Comment 1";

                enquiryFeedbackList.Add(enquiryFeedback);

                enquiryFeedback         = new EnquiryFeedback();
                enquiryFeedback.Date    = "01/01/2018";
                enquiryFeedback.Comment = "Comment 1";

                enquiryFeedbackList.Add(enquiryFeedback);

                enquiryFeedback         = new EnquiryFeedback();
                enquiryFeedback.Date    = "01/01/2018";
                enquiryFeedback.Comment = "Comment 1";

                enquiryFeedbackList.Add(enquiryFeedback);


                enquiryFeedback         = new EnquiryFeedback();
                enquiryFeedback.Date    = "01/02/2018";
                enquiryFeedback.Comment = "Comment 2";

                enquiryFeedbackList.Add(enquiryFeedback);

                if (enquiryFeedbackList != null && enquiryFeedbackList.Count > 0)
                {
                    enquiryUserFeedbackListView.SetAdapter(new EnquiryFeedback_ItemAdapter(this, enquiryFeedbackList, linearProgressBar, details));
                }
                linearProgressBar.Visibility = Android.Views.ViewStates.Gone;
            }
        }
Exemple #25
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            commonDetails = JsonConvert.DeserializeObject <CommonDetails>(Intent.GetStringExtra("details"));


            batchPlayerListView = FindViewById <ListView>(Resource.Id.lstBatchPlayer);
            lblHeader           = FindViewById <TextView>(Resource.Id.lblheader);
            linearProgressBar   = FindViewById <LinearLayout>(Resource.Id.linearProgressBar);
            txtAttendance       = FindViewById <TextView>(Resource.Id.txtAttendance);
            btnSubmit           = FindViewById <Button>(Resource.Id.btnSubmit);
            btnCancel           = FindViewById <Button>(Resource.Id.btnCancel);
            btnAddPlayer        = FindViewById <Button>(Resource.Id.btnAddPlayer);
            //btnGo = FindViewById<Button>(Resource.Id.btnGo);
            llAttendance = FindViewById <LinearLayout>(Resource.Id.llAttendance);

            txtSelectDate = FindViewById <TextView>(Resource.Id.txtSelectDate);
            txtSelectDate.SetOnTouchListener(new CompletionDateTouchListener(this));

            //for regular text getting Montserrat-Light.otf
            Typeface face = Typeface.CreateFromAsset(Application.Context.Assets, "fonts/zekton rg.ttf");

            lblHeader.SetTypeface(face, TypefaceStyle.Bold);
            txtSelectDate.SetTypeface(face, TypefaceStyle.Normal);
            txtAttendance.SetTypeface(face, TypefaceStyle.Normal);
            btnSubmit.SetTypeface(face, TypefaceStyle.Normal);
            btnCancel.SetTypeface(face, TypefaceStyle.Normal);
            //btnGo.SetTypeface(face, TypefaceStyle.Normal);
            btnAddPlayer.SetTypeface(face, TypefaceStyle.Normal);

            btnSubmit.SetAllCaps(false);
            btnCancel.SetAllCaps(false);
            //btnGo.SetAllCaps(false);
            btnAddPlayer.SetAllCaps(false);

            txtSelectDate.Text = DateTime.Now.ToString("yyyy/MM/dd");



            linearProgressBar.Visibility = Android.Views.ViewStates.Visible;

            new Thread(new ThreadStart(delegate
            {
                RunOnUiThread(async() =>
                {
                    await LoadPlayer(commonDetails, Convert.ToDateTime(txtSelectDate.Text));
                    linearProgressBar.Visibility = Android.Views.ViewStates.Gone;
                });
            })).Start();

            btnSubmit.Click += btnSubmit_Click;
            //btnGo.Click += btnGo_Click;
            btnCancel.Click    += btnCancel_Click;
            btnAddPlayer.Click += btnAddPlayer_Click;

            if (commonDetails.isAttendance)
            {
                llAttendance.Visibility = ViewStates.Visible;
                btnSubmit.Visibility    = ViewStates.Visible;
                btnCancel.Visibility    = ViewStates.Visible;
                btnAddPlayer.Visibility = ViewStates.Visible;
            }
            else
            {
                llAttendance.Visibility = ViewStates.Gone;
                btnSubmit.Visibility    = ViewStates.Gone;
                btnCancel.Visibility    = ViewStates.Gone;
                btnAddPlayer.Visibility = ViewStates.Gone;
            }
        }
Exemple #26
0
        public void CheckLandingPage(CommonDetails details)
        {
            ServiceHelper serviceHelper;

            serviceHelper = new ServiceHelper();

            List <Sport>           sportList = new List <Sport>();
            List <Court>           courtList = new List <Court>();
            List <BatchCountModel> batchList = new List <BatchCountModel>();

            sportList = serviceHelper.GetSports(details.access_token, details.VenueId);


            if (sportList != null && sportList.Count > 0)
            {
                if (sportList.Count > 1)
                {
                    var sportIntent = new Intent(this, typeof(SportActivity));
                    sportIntent.PutExtra("details", JsonConvert.SerializeObject(details));
                    this.StartActivity(sportIntent);
                    this.Finish();
                }
                else
                {
                    serviceHelper = new ServiceHelper();

                    details.SportId = sportList[0].SportId.ToString();

                    courtList = serviceHelper.GetCourt(details.access_token, details.VenueId, details.SportId);
                    if (courtList != null && courtList.Count > 0)
                    {
                        if (courtList.Count > 1)
                        {
                            var courtIntent = new Intent(this, typeof(CourtActivity));
                            courtIntent.PutExtra("details", JsonConvert.SerializeObject(details));
                            this.StartActivity(courtIntent);
                            this.Finish();
                        }
                        else
                        {
                            serviceHelper = new ServiceHelper();

                            details.CourtId = courtList[0].CourtId.ToString();

                            batchList = serviceHelper.GetBatch(details.access_token, details.VenueId, details.SportId, details.CourtId);

                            var batchesIntent = new Intent(this, typeof(BatchesActivity));
                            batchesIntent.PutExtra("details", JsonConvert.SerializeObject(details));
                            this.StartActivity(batchesIntent);
                            this.Finish();
                        }
                    }
                    else
                    {
                        helper.AlertPopUp("Warning", "There are no court available", this);
                    }
                }
            }
            else
            {
                helper.AlertPopUp("Warning", "There are no sports available", this);
            }
        }
Exemple #27
0
        private async Task LoadEnquiryUser(CommonDetails details)
        {
            ServiceHelper serviceHelper = new ServiceHelper();

            if (helper.CheckInternetConnection(this))
            {
                try
                {
                    //courtList = serviceHelper.GetCourt(details.access_token, details.VenueId, details.SportId);
                    //EnquiryUser enquiryUser;

                    //enquiryUser = new EnquiryUser();
                    //enquiryUser.FirstName = "Karthi";
                    //enquiryUser.Mobile = "97467664";
                    //enquiryUserList.Add(enquiryUser);


                    //enquiryUser = new EnquiryUser();
                    //enquiryUser.FirstName = "Karthi";
                    //enquiryUser.Mobile = "97467664";
                    //enquiryUserList.Add(enquiryUser);

                    //enquiryUser = new EnquiryUser();
                    //enquiryUser.FirstName = "Karthi";
                    //enquiryUser.Mobile = "97467664";
                    //enquiryUserList.Add(enquiryUser);

                    //enquiryUser = new EnquiryUser();
                    //enquiryUser.FirstName = "Karthi";
                    //enquiryUser.Mobile = "97467664";
                    //enquiryUserList.Add(enquiryUser);

                    //enquiryUser = new EnquiryUser();
                    //enquiryUser.FirstName = "Karthi";
                    //enquiryUser.Mobile = "97467664";
                    //enquiryUserList.Add(enquiryUser);

                    //enquiryUser = new EnquiryUser();
                    //enquiryUser.FirstName = "Karthi";
                    //enquiryUser.Mobile = "97467664";
                    //enquiryUserList.Add(enquiryUser);

                    //enquiryUser = new EnquiryUser();
                    //enquiryUser.FirstName = "Karthi";
                    //enquiryUser.Mobile = "97467664";
                    //enquiryUserList.Add(enquiryUser);

                    //enquiryUser = new EnquiryUser();
                    //enquiryUser.FirstName = "Karthi";
                    //enquiryUser.Mobile = "97467664";
                    //enquiryUserList.Add(enquiryUser);

                    //enquiryUser = new EnquiryUser();
                    //enquiryUser.FirstName = "Karthi";
                    //enquiryUser.Mobile = "97467664";
                    //enquiryUserList.Add(enquiryUser);

                    //enquiryUser = new EnquiryUser();
                    //enquiryUser.FirstName = "Karthi";
                    //enquiryUser.Mobile = "97467664";
                    //enquiryUserList.Add(enquiryUser);


                    //enquiryUser = new EnquiryUser();
                    //enquiryUser.FirstName = "hanne";
                    //enquiryUser.Mobile = "243254542";
                    //enquiryUserList.Add(enquiryUser);


                    //enquiryUser = new EnquiryUser();
                    //enquiryUser.FirstName = "karthi";
                    //enquiryUser.Mobile = "803894092840";
                    //enquiryUserList.Add(enquiryUser);


                    linearProgressBar.Visibility = Android.Views.ViewStates.Visible;
                    new Thread(new ThreadStart(delegate
                    {
                        RunOnUiThread(async() => { await LoadEnquiryList(commonDetails); linearProgressBar.Visibility = Android.Views.ViewStates.Gone; });
                    })).Start();


                    if (enquiryModelList != null && enquiryModelList.Count > 0)
                    {
                        enquiryUserListView.SetAdapter(new EnquiryUser_ItemAdapter(this, enquiryModelList, linearProgressBar, details));
                    }

                    linearProgressBar.Visibility = Android.Views.ViewStates.Gone;
                }
                catch (Exception e)
                {
                    helper.AlertPopUp("Error", "Unable to retrive data the server", this);
                    linearProgressBar.Visibility = Android.Views.ViewStates.Gone;
                }
            }
            else
            {
                helper.AlertPopUp("Warning", "Please enable mobile data", this);
                linearProgressBar.Visibility = Android.Views.ViewStates.Gone;
            }
        }