public override Android.Views.View OnCreateView(Android.Views.LayoutInflater inflater, Android.Views.ViewGroup container, Bundle savedInstanceState)
        {
            var    ignored    = base.OnCreateView(inflater, container, savedInstanceState);
            var    view       = (ViewGroup)inflater.Inflate(Resource.Layout.layout_news, null);
            var    viewGroup  = (ViewGroup)inflater.Inflate(Resource.Layout.layout_group, null);
            string string_key = "41f579fc-1445-4065-ab10-c06d50e724d3";
            //NewsDetail = new NewsFragmentDetail ();

            //var mFragmentItemContainer = viewGroup.FindViewById<FrameLayout> (Resource.Id.fragment4Container);

            Button button = viewGroup.FindViewById <Button> (Resource.Id.btnDetalle);

            mFrameLayoutContainer = view.FindViewById <FrameLayout> (Resource.Id.RelativeLay);

            var trans = Activity.SupportFragmentManager.BeginTransaction();

            //trans.Add (mFragmentItemContainer.Id, new NewsFragmentDetail (), "Detail");
            //trans.Add (Resource.Id.layout_content, NewsDetail);
            //trans.Hide (NewsDetail);
            mCurrentFragment = this;
            trans.Commit();


            mRecyclerView = view.FindViewById <RecyclerView> (Resource.Id.RecyclerViewer);
            //Pruebas

            //cocoservices.tinnova.mx.COCOService cliente = new Navigation_View.cocoservices.tinnova.mx.COCOService ();
            //Navigation_View.cocoservices.tinnova.mx.PublicationDTO[] mPublicacion = new Navigation_View.cocoservices.tinnova.mx.PublicationDTO[5];

            //Produccion

            services_911consumidor_com.COCOService cliente = new Navigation_View.services_911consumidor_com.COCOService();
            Navigation_View.services_911consumidor_com.PublicationDTO[] mPublicacion = new Navigation_View.services_911consumidor_com.PublicationDTO[5];

            mPublicacion   = cliente.GetActivePublications(string_key);
            mPublicaciones = new List <Publicaciones> ();

            foreach (PublicationDTO value in mPublicacion)
            {
                mPublicaciones.Add(new Publicaciones {
                    Titulo           = value.Tittle,
                    FechaPublicacion = value.PublicationDate,
                    Subtitulo        = value.SubTittle,
                    Imagen           = value.ImageUrl,
                    IdPublicacion    = value.Id,
                    Contenido        = value.Content
                });
            }

            mLayoutManager = new LinearLayoutManager(view.Context);
            mRecyclerView.SetLayoutManager(mLayoutManager);
            mAdapter = new adapter_listview(mPublicaciones, mRecyclerView, view.Context);
            mRecyclerView.SetAdapter(mAdapter);


            return(view);
            // Create your fragment here
        }
		public override Android.Views.View OnCreateView (Android.Views.LayoutInflater inflater, Android.Views.ViewGroup container, Bundle savedInstanceState)
		{
			var ignored = base.OnCreateView (inflater,container,savedInstanceState);
			var view = (ViewGroup)inflater.Inflate (Resource.Layout.layout_news, null);
			var viewGroup = (ViewGroup)inflater.Inflate (Resource.Layout.layout_group, null);
			string string_key = "41f579fc-1445-4065-ab10-c06d50e724d3";
			//NewsDetail = new NewsFragmentDetail ();

			//var mFragmentItemContainer = viewGroup.FindViewById<FrameLayout> (Resource.Id.fragment4Container);

			Button button = viewGroup.FindViewById<Button> (Resource.Id.btnDetalle);

			mFrameLayoutContainer = view.FindViewById<FrameLayout> (Resource.Id.RelativeLay);

			var trans = Activity.SupportFragmentManager.BeginTransaction ();
			//trans.Add (mFragmentItemContainer.Id, new NewsFragmentDetail (), "Detail");
			//trans.Add (Resource.Id.layout_content, NewsDetail);
			//trans.Hide (NewsDetail);
			mCurrentFragment = this;
			trans.Commit ();


			mRecyclerView = view.FindViewById<RecyclerView> (Resource.Id.RecyclerViewer);
			//Pruebas

			//cocoservices.tinnova.mx.COCOService cliente = new Navigation_View.cocoservices.tinnova.mx.COCOService ();
			//Navigation_View.cocoservices.tinnova.mx.PublicationDTO[] mPublicacion = new Navigation_View.cocoservices.tinnova.mx.PublicationDTO[5];

			//Produccion

			services_911consumidor_com.COCOService cliente = new Navigation_View.services_911consumidor_com.COCOService();
			Navigation_View.services_911consumidor_com.PublicationDTO[] mPublicacion = new Navigation_View.services_911consumidor_com.PublicationDTO[5];

			mPublicacion = cliente.GetActivePublications (string_key);
			mPublicaciones = new List<Publicaciones> ();

			foreach (PublicationDTO value in mPublicacion) {
				mPublicaciones.Add (new Publicaciones {
					Titulo = value.Tittle,
					FechaPublicacion = value.PublicationDate,
					Subtitulo = value.SubTittle,
					Imagen = value.ImageUrl,
					IdPublicacion = value.Id,
					Contenido = value.Content
				});
			}

			mLayoutManager = new LinearLayoutManager (view.Context);
			mRecyclerView.SetLayoutManager (mLayoutManager);
			mAdapter = new adapter_listview (mPublicaciones, mRecyclerView, view.Context);
			mRecyclerView.SetAdapter (mAdapter);


			return view;
			// Create your fragment here
		}
		public override Android.Views.View OnCreateView (Android.Views.LayoutInflater inflater, Android.Views.ViewGroup container, Bundle savedInstanceState)
		{
			var ignored = base.OnCreateView (inflater, container, savedInstanceState);
			string Email = string.Empty;
			var view = (ViewGroup)inflater.Inflate (Resource.Layout.layout_seguimiento, null);
			string string_key = "41f579fc-1445-4065-ab10-c06d50e724d3";

			mFrameLayoutContainer = view.FindViewById<FrameLayout> (Resource.Id.RelativeSeguimientoDetail);

			var trans = Activity.SupportFragmentManager.BeginTransaction ();

			mCurrentFragment = this;
			trans.Commit ();

			mRecyclerView = view.FindViewById<RecyclerView> (Resource.Id.RecyclerViewerSeguimiento);

			//Pruebas
			//cocoservices.tinnova.mx.COCOService cliente = new Navigation_View.cocoservices.tinnova.mx.COCOService ();
			//Navigation_View.cocoservices.tinnova.mx.TicketDTO[] TicketDTOList = new Navigation_View.cocoservices.tinnova.mx.TicketDTO[50];

			//Produccion
			services_911consumidor_com.COCOService cliente = new Navigation_View.services_911consumidor_com.COCOService();
			Navigation_View.services_911consumidor_com.TicketDTO[] TicketDTOList = new Navigation_View.services_911consumidor_com.TicketDTO[50];
			mTickets = new List<Ticket> ();
			mTicketsDetails = new List<TicketDetail> ();

			var accounts = AccountStore.Create (view.Context).FindAccountsForService ("consumidor");
			foreach (var account in accounts) {
				Email = account.Properties ["Email"];
			}

			TicketDTOList = cliente.GetTicketsByUser (Email, string_key);

			foreach (TicketDTO value in TicketDTOList) {
				mTickets.Add (new Ticket {
					Nombre = value.Client.FirstName + value.Client.LastName,
					Ciudad = value.Client.AddressCity,
					CodigoPostal = value.Client.PostalCode,
					Email = value.Client.Email,
					Estado = value.Client.AddressState,
					Fecha = value.TicketDate,
					Nota = value.Notes,
					Telefono = value.Client.Phone,
					Tipo = value.Type.ObjId.ToString (),
					TicketID = value.Id.ToString (),
					Estatus = value.Status.Name
				});
				foreach (TicketDetailDTO valueDetail in value.TicketDetail) {
					mTicketsDetails.Add (new TicketDetail {
						AgenteID = valueDetail.Agent.UserId,
						Asunto = valueDetail.Subject,
						Fecha = valueDetail.DetailDate,
						Mensaje = valueDetail.Message,
						StatusID = valueDetail.Status.Id,
						Status = valueDetail.Status.Name,
						TicketID = valueDetail.TIC_ID
					});
				}
			}

			mLayoutManager = new LinearLayoutManager (view.Context);
			mRecyclerView.SetLayoutManager (mLayoutManager);
			mAdapter = new Seguimiento_Adapter (mTickets, mTicketsDetails, mRecyclerView, view.Context);
			mRecyclerView.SetAdapter (mAdapter);

			return view;

		}
Esempio n. 4
0
        public override Android.Views.View OnCreateView(Android.Views.LayoutInflater inflater, Android.Views.ViewGroup container, Bundle savedInstanceState)
        {
            var    ignored    = base.OnCreateView(inflater, container, savedInstanceState);
            string Email      = string.Empty;
            var    view       = (ViewGroup)inflater.Inflate(Resource.Layout.layout_seguimiento, null);
            string string_key = "41f579fc-1445-4065-ab10-c06d50e724d3";

            mFrameLayoutContainer = view.FindViewById <FrameLayout> (Resource.Id.RelativeSeguimientoDetail);

            var trans = Activity.SupportFragmentManager.BeginTransaction();

            mCurrentFragment = this;
            trans.Commit();

            mRecyclerView = view.FindViewById <RecyclerView> (Resource.Id.RecyclerViewerSeguimiento);

            //Pruebas
            //cocoservices.tinnova.mx.COCOService cliente = new Navigation_View.cocoservices.tinnova.mx.COCOService ();
            //Navigation_View.cocoservices.tinnova.mx.TicketDTO[] TicketDTOList = new Navigation_View.cocoservices.tinnova.mx.TicketDTO[50];

            //Produccion
            services_911consumidor_com.COCOService cliente = new Navigation_View.services_911consumidor_com.COCOService();
            Navigation_View.services_911consumidor_com.TicketDTO[] TicketDTOList = new Navigation_View.services_911consumidor_com.TicketDTO[50];
            mTickets        = new List <Ticket> ();
            mTicketsDetails = new List <TicketDetail> ();

            var accounts = AccountStore.Create(view.Context).FindAccountsForService("consumidor");

            foreach (var account in accounts)
            {
                Email = account.Properties ["Email"];
            }

            TicketDTOList = cliente.GetTicketsByUser(Email, string_key);

            foreach (TicketDTO value in TicketDTOList)
            {
                mTickets.Add(new Ticket {
                    Nombre       = value.Client.FirstName + value.Client.LastName,
                    Ciudad       = value.Client.AddressCity,
                    CodigoPostal = value.Client.PostalCode,
                    Email        = value.Client.Email,
                    Estado       = value.Client.AddressState,
                    Fecha        = value.TicketDate,
                    Nota         = value.Notes,
                    Telefono     = value.Client.Phone,
                    Tipo         = value.Type.ObjId.ToString(),
                    TicketID     = value.Id.ToString(),
                    Estatus      = value.Status.Name
                });
                foreach (TicketDetailDTO valueDetail in value.TicketDetail)
                {
                    mTicketsDetails.Add(new TicketDetail {
                        AgenteID = valueDetail.Agent.UserId,
                        Asunto   = valueDetail.Subject,
                        Fecha    = valueDetail.DetailDate,
                        Mensaje  = valueDetail.Message,
                        StatusID = valueDetail.Status.Id,
                        Status   = valueDetail.Status.Name,
                        TicketID = valueDetail.TIC_ID
                    });
                }
            }

            mLayoutManager = new LinearLayoutManager(view.Context);
            mRecyclerView.SetLayoutManager(mLayoutManager);
            mAdapter = new Seguimiento_Adapter(mTickets, mTicketsDetails, mRecyclerView, view.Context);
            mRecyclerView.SetAdapter(mAdapter);

            return(view);
        }