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;

		}
 public int CreateTicket(TicketDTO objDto, string key) {
     object[] results = this.Invoke("CreateTicket", new object[] {
                 objDto,
                 key});
     return ((int)(results[0]));
 }
 /// <remarks/>
 public System.IAsyncResult BeginCreateTicket(TicketDTO objDto, string key, System.AsyncCallback callback, object asyncState) {
     return this.BeginInvoke("CreateTicket", new object[] {
                 objDto,
                 key}, callback, asyncState);
 }
Пример #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);
        }