Ejemplo n.º 1
0
        bool MigrateAvailability(JObject x)
        {
            // determine our mode
            var a = new Availability();
            var availableToPublic = x.Value<bool>("AvailableToPublic ");
            var availableToAll = x.Value<bool>("AvailableToAllUsers");
            a.Mode = availableToPublic
                ? AvailabilityMode.AvailableToPublic
                : availableToAll 
                    ? AvailabilityMode.AvailableToAllUsers
                    : AvailabilityMode.AvailableOnlyTo;
            
            // copy users & groups arrays if there's any reason to
            if (AvailabilityMode.AvailableOnlyTo == a.Mode)
            {
                var users = x["Users"] as JArray;
                if (null != users)
                {
                    a.Users = users.Select(y => y.Value<string>()).ToArray();
                }
                var groups = x["Groups"] as JArray;
                if (null != groups)
                {
                    a.Groups = groups.Select(y => y.Value<string>()).ToArray();
                }
            }

            x["Availability"] = Session.Serializer.WriteFragment(a);
            return true;
        }
Ejemplo n.º 2
0
 public DecisionMaker(string id, Team team)
 {
     this.isHuman = false;
     this.id = id;
     this.team = team;
     this.color = 000000;
     this.availability = Availability.AVAILABLE;
     this.briefing = string.Empty;
 }
Ejemplo n.º 3
0
		/// <summary>
		/// Initializes a new instance of the Status class.
		/// </summary>
		/// <param name="availability">The availability state.</param>
		/// <param name="messages">A dictionary of messages providing detailed
		/// descriptions of the availability state. The dictionary keys denote
		/// the languages of the messages and must be valid ISO 2 letter language
		/// codes.</param>
		/// <param name="priority">Provides a hint for stanza routing.</param>
		public Status(Availability availability, Dictionary<string, string> messages,
			sbyte priority = 0) {
				Availability = availability;
				Priority = priority;
				Messages = new Dictionary<string, string>();
				if (messages != null) {
					foreach (KeyValuePair<string, string> pair in messages)
						Messages.Add(pair.Key, pair.Value);
				}
		}
Ejemplo n.º 4
0
		/// <summary>
		/// Initializes a new instance of the Status class.
		/// </summary>
		/// <param name="availability">The availability state.</param>
		/// <param name="message">An optional message providing a detailed
		/// description of the availability state.</param>
		/// <param name="priority">Provides a hint for stanza routing.</param>
		/// <param name="language">The language of the description of the
		/// availability state.</param>
		public Status(Availability availability, string message = null,
			sbyte priority = 0, CultureInfo language = null) {
			Availability = availability;
			Priority = priority;
			Messages = new Dictionary<string, string>();
			if (language == null)
				language = CultureInfo.CurrentCulture;
			if(message != null)
				Messages.Add(language.Name, message);
		}
        public void OnStatusChanged(string provider, Availability status, Bundle extras)
        {
            switch (status)
            {
                case Availability.Available:
                    OnProviderEnabled(provider);
                    break;

                case Availability.OutOfService:
                    OnProviderDisabled(provider);
                    break;
            }
        }
Ejemplo n.º 6
0
        public AppearanceFeatureModel(string name, AppearanceType type, string description = "", Availability availability = Availability.Common, List<Race> races = null, List<Gender> genders = null)
        {
            Name = name;
            AppearanceType = type;
            Description = description.NotNullOrEmpty() ? description : name;
            Availability = availability;

            var raceEnums = races ?? AllRaces;
            Races = string.Join("|", raceEnums);

            var genderEnums = genders ?? new List<Gender> {Gender.Female, Gender.Male};
            Genders = string.Join("|", genderEnums);
        }
Ejemplo n.º 7
0
 public void OnStatusChanged(string provider, Availability status, Bundle extras)
 {
     switch (status)
     {
         case Availability.OutOfService:
             _isUnavailable();
             break;
         case Availability.TemporarilyUnavailable:
             _isUnavailable();
             break;
         case Availability.Available:
             _isAvailable();
             break;
     }
 }
 public async Task<ActionResult> Index(AvailabilityModel model)
 {
     bool saveSuccessful = false;
     if (ModelState.IsValid)
     {
         using (var client = new DataServiceClient())
         {
             client.Open();
             var infoToStore = new Availability();
             infoToStore.applicantId = Convert.ToInt32(this.Session["ApplicantId"]);
             infoToStore.daysYN = model.daysYN;
             infoToStore.eveningsYN = model.eveningsYN;
             infoToStore.weekendsYN = model.weekendsYN;
             infoToStore.fullTimeYN = model.fullTimeYN;
             infoToStore.salaryExpected = model.salaryExpected;
             infoToStore.mondayFrom = model.mondayFrom > 0 ? new Nullable<TimeSpan>(new TimeSpan(model.mondayFrom - 1, 0, 0)) : null;
             infoToStore.mondayTo = model.mondayTo > 0 ? new Nullable<TimeSpan>(new TimeSpan(model.mondayTo - 1, 0, 0)) : null;
             infoToStore.tuesdayFrom = model.tuesdayFrom > 0 ? new Nullable<TimeSpan>(new TimeSpan(model.tuesdayFrom - 1, 0, 0)) : null;
             infoToStore.tuesdayTo = model.tuesdayTo > 0 ? new Nullable<TimeSpan>(new TimeSpan(model.tuesdayTo - 1, 0, 0)) : null;
             infoToStore.wednesdayFrom = model.wednesdayFrom > 0 ? new Nullable<TimeSpan>(new TimeSpan(model.wednesdayFrom - 1, 0, 0)) : null;
             infoToStore.wednesdayTo = model.wednesdayTo > 0 ? new Nullable<TimeSpan>(new TimeSpan(model.wednesdayTo - 1, 0, 0)) : null;
             infoToStore.thursdayFrom = model.thursdayFrom > 0 ? new Nullable<TimeSpan>(new TimeSpan(model.thursdayFrom - 1, 0, 0)) : null;
             infoToStore.thursdayTo = model.thursdayTo > 0 ? new Nullable<TimeSpan>(new TimeSpan(model.thursdayTo - 1, 0, 0)) : null;
             infoToStore.fridayFrom = model.fridayFrom > 0 ? new Nullable<TimeSpan>(new TimeSpan(model.fridayFrom - 1, 0, 0)) : null;
             infoToStore.fridayTo = model.fridayTo > 0 ? new Nullable<TimeSpan>(new TimeSpan(model.fridayTo - 1, 0, 0)) : null;
             infoToStore.saturdayFrom = model.saturdayFrom > 0 ? new Nullable<TimeSpan>(new TimeSpan(model.saturdayFrom - 1, 0, 0)) : null;
             infoToStore.saturdayTo = model.saturdayTo > 0 ? new Nullable<TimeSpan>(new TimeSpan(model.saturdayTo - 1, 0, 0)) : null;
             infoToStore.sundayFrom = model.sundayFrom > 0 ? new Nullable<TimeSpan>(new TimeSpan(model.sundayFrom - 1, 0, 0)) : null;
             infoToStore.sundayTo = model.sundayTo > 0 ? new Nullable<TimeSpan>(new TimeSpan(model.sundayTo - 1, 0, 0)) : null;
             infoToStore.applicantId = model.applicantId;
             saveSuccessful = await client.updateAvailabilityAsync(infoToStore);
             client.Close();
         }
         if (saveSuccessful)
         {
             this.Session["Availability"] = "Done";
             return RedirectToAction("Index", "JobHistory");
         }
         else
         {
             //some error has occured saving --currently do nothing
         }
     }
     return View(model);
 }
		/// <summary>
		/// Called when the state of a location provider has changed.
		/// </summary>
		void ILocationListener.OnStatusChanged(string provider, Availability status, Bundle extras)
		{
			Log.Debug(logTag, "OnStatusChanged: " + provider + " - " + status);
		}
Ejemplo n.º 10
0
 public void OnStatusChanged(string provider, Availability status, global::Android.OS.Bundle extras)
 {
     //Not Implemented
 }
Ejemplo n.º 11
0
 public void OnStatusChanged(string provider, Availability status, Bundle extras)
 {
     if(provider == LocationManager.GpsProvider)
     {
         gpsStatus2.Text = status.ToString();
     }
     else if(provider == LocationManager.NetworkProvider)
     {
         networkStatus.Text = status.ToString();
     }
 }
Ejemplo n.º 12
0
 void ILocationListener.OnStatusChanged(string provider, Availability status, Bundle extras)
 {
 }
Ejemplo n.º 13
0
 public void OnStatusChanged(string provider, [GeneratedEnum] Availability status, Bundle extras)
 {
     throw new System.NotImplementedException();
 }
Ejemplo n.º 14
0
        /// <summary>
		/// Status of the location services provider.
		/// </summary>
		/// <param name="provider">Type of provider for location services.</param>
		/// <param name="status">Availability of location services.</param>
		/// <param name="extras">Bundle.</param>
		public void OnStatusChanged(String provider, Availability status, Bundle extras)
        {
            // Required for ILocationListener
        }
Ejemplo n.º 15
0
		public void OnStatusChanged (string provider, Availability status, Bundle extras)
		{
			this.StatusChanged (this, new StatusChangedEventArgs (provider, status, extras));
		}
 public void OnStatusChanged(string provider, Availability status, Bundle extras)
 {
     Log.Debug(tag, provider + " availability has changed to " + status.ToString());
 }
Ejemplo n.º 17
0
 public void OnStatusChanged(string provider, Availability status, Bundle extras)
 {
     Console.WriteLine("{0}, {1}", provider, status);
 }
Ejemplo n.º 18
0
        // GET api/<controller>
        public List <Availability> Get()
        {
            Availability a = new Availability();

            return(a.getAvailabilities());
        }
Ejemplo n.º 19
0
        // POST api/<controller>



        public Availability Post([FromBody] Availability availability)
        {
            availability.insert();
            return(availability);
        }
Ejemplo n.º 20
0
 /// <summary>
 /// Class to represent the buttons in a timetable
 /// </summary>
 /// <param name="color">color of the button</param>
 /// <param name="x">x coordinate of the button in pixels</param>
 /// <param name="y">y coordinate of the button in pixels</param>
 /// <param name="height">height of the button in pixels</param>
 /// <param name="width">width of the button in pixels</param>
 /// <param name="text">Text to be displayed on the button</param>
 /// <param name="scale">Determines the position of the text on the button</param>
 /// <param name="value">The string returned when the button is clicked</param>
 public Block(Color color, float x, float y, int height, int width, string text, int scale, string value) : base(color, x, y, height, width, text, scale, value)
 {
     _availability = Availability.N;
 }
Ejemplo n.º 21
0
 public void AddEditInstallerAvailability(Availability a)
 {
     InstallUserDAL.Instance.AddEditInstallerAvailability(a);
 }
Ejemplo n.º 22
0
 public void OnStatusChanged(string provider, [GeneratedEnum] Availability status, Bundle extras)
 {
     System.Diagnostics.Debug.WriteLine(provider + " availability has changed to " + status.ToString());
 }
Ejemplo n.º 23
0
 public void SetPresence(Availability status, string message, int priority)
 {
     switch (status) {
         case Availability.Available:
             XmppGlobal.InternalClient.Presence (PresenceType.available, message, "", priority);
             break;
         case Availability.Chat:
             XmppGlobal.InternalClient.Presence (PresenceType.available, message, "chat", priority);
             break;
         case Availability.Away:
             XmppGlobal.InternalClient.Presence (PresenceType.available, message, "away", priority);
             break;
         case Availability.ExtendedAway:
             XmppGlobal.InternalClient.Presence (PresenceType.available, message, "xa", priority);
             break;
         case Availability.DoNotDisturb:
             XmppGlobal.InternalClient.Presence (PresenceType.available, message, "dnd", priority);
             break;
     }
 }
Ejemplo n.º 24
0
 public void OnStatusChanged(string provider, Availability status, global::Android.OS.Bundle extras)
 {
     //Not Implemented
 }
 /// <summary>
 /// Called when the provider status changes.
 /// </summary>
 /// <param name="provider">The name of the location provider associated with this update.</param>
 /// <param name="status">The status.</param>
 /// <param name="extras">The extras.</param>
 public void OnStatusChanged(string provider, Availability status, Bundle extras)
 {
     StatusChanged.SafeInvoke(this);
 }
 /// <summary>
 /// Additional operations to be performed when cloning an instance of <see cref="Availability"/> to an instance of <see cref="PSProductAvailability" />.
 /// </summary>
 /// <param name="productAvailability">The product availablity being cloned.</param>
 private void CloneAdditionalOperations(Availability productAvailability)
 {
     AvailabilityId        = productAvailability.Id;
     DefaultCurrencyCode   = productAvailability.DefaultCurrency.Code;
     DefaultCurrencySymbol = productAvailability.DefaultCurrency.Symbol;
 }
		public void OnStatusChanged (string provider, Availability status, Bundle extras)
		{
			Log.Debug (tag, provider + " availability has changed to " + status.ToString());
			OnResume ();
		}
 /// <summary>
 /// Initializes a new instance of the <see cref="PSProductAvailability" /> class.
 /// </summary>
 /// <param name="productAvailability">The base product availablity for this instance.</param>
 public PSProductAvailability(Availability productAvailability)
 {
     this.CopyFrom(productAvailability, CloneAdditionalOperations);
 }
Ejemplo n.º 29
0
 /// <summary>
 /// Sets the availability status.
 /// </summary>
 /// <param name="availability">The availability state. Can be one of the
 /// values from the Availability enumeration, however not
 /// Availability.Offline.</param>
 /// <param name="messages">A dictionary of messages providing detailed
 /// descriptions of the availability state. The dictionary keys denote
 /// the languages of the messages and must be valid ISO 2 letter language
 /// codes.</param>
 /// <param name="priority">Provides a hint for stanza routing.</param>
 /// <exception cref="ArgumentException">The availability parameter has a
 /// value of Availability.Offline.</exception>
 /// <exception cref="IOException">There was a failure while writing to or reading
 /// from the network.</exception>
 /// <exception cref="InvalidOperationException">The XmppClient instance is not
 /// connected to a remote host, or the XmppClient instance has not authenticated with
 /// the XMPP server.</exception>
 /// <exception cref="ObjectDisposedException">The XmppClient object has been
 /// disposed.</exception>
 public void SetStatus(Availability availability,
     Dictionary<string, string> messages, sbyte priority = 0)
 {
     AssertValid();
     im.SetStatus(availability, messages, priority);
 }
Ejemplo n.º 30
0
 public void OnStatusChanged(string provider, [GeneratedEnum] Availability status, Bundle extras)
 {
 }
 public void OnStatusChanged(string provider, Availability status, Bundle extras)
 {
     Console.WriteLine("{0}, {1}", provider, status);
 }
Ejemplo n.º 32
0
 public void OnStatusChanged(string provider, Availability status, Bundle extras)
 {
     Toast.MakeText(this, "Provider status " + status.ToString(), ToastLength.Short).Show();
 }
Ejemplo n.º 33
0
 public static IEnumerable <long> CalculateTimeFromEpoch(Availability availability)
 {
     return(EachDay(availability.StartTime, (DateTime)availability.EndTime)
            .Select(day => (long)(day - new DateTime(1970, 1, 1)).TotalSeconds));
 }
Ejemplo n.º 34
0
        public static bool SaveAvailability(Availability avail, string conStr)
        {
            if (avail != null)
            {
                using (SqlConnection connection = new SqlConnection(conStr))
                {
                    User curUser = User.CurrentUser;
                    //long subId = -1;
                    //switch (curUser.Type)
                    //{
                    //    case EntityType.Tutor:
                    //        subId = ((TutorProfile)curUser).Id;
                    //        break;
                    //    case EntityType.Student:
                    //        subId = ((Student)curUser).Id;
                    //        break;
                    //    case EntityType.Parent:
                    //        subId = ((Parent)curUser).Id;
                    //        break;
                    //    case EntityType.School:
                    //        subId = ((School)curUser).Id;
                    //        break;
                    //}
                    DataTable availability = new DataTable();// "Availability");
                    availability.Columns.Add("UId", typeof(long));
                    availability.Columns.Add("ObjEntityId", typeof(byte));
                    availability.Columns.Add("DayId", typeof(byte));
                    availability.Columns.Add("FromTime", typeof(byte));
                    availability.Columns.Add("ToTime", typeof(byte));
                    availability.Columns.Add("PhoneCall", typeof(bool));
                    availability.Columns.Add("OnlineSession", typeof(bool));
                    availability.Columns.Add("FacetoFace", typeof(bool));
                    avail.Days.Where <AvailabilityDay>(d => d.Active).ToList().ForEach(d => d.Limits.ToList <TimeLimit>().ForEach(t => {
                        DataRow row          = availability.NewRow();
                        row["UId"]           = curUser.UserId;
                        row["ObjEntityId"]   = (byte)curUser.Type;
                        row["DayId"]         = d.Day.Index;
                        row["FromTime"]      = t.From.Index;
                        row["ToTime"]        = t.To.Index;
                        row["PhoneCall"]     = t.Extra.PhoneCall;
                        row["OnlineSession"] = t.Extra.OnlineSession;
                        row["FacetoFace"]    = t.Extra.FaceToFace;
                        availability.Rows.Add(row);
                    }));
                    SqlCommand cmd = new SqlCommand("sp_ManageAvailability", connection);
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.Add(new SqlParameter
                    {
                        ParameterName = "@Avail",
                        TypeName      = "Availability",
                        SqlDbType     = SqlDbType.Structured,
                        Value         = availability
                    });

                    cmd.Parameters.Add(new SqlParameter
                    {
                        ParameterName = "@Mode",
                        SqlDbType     = SqlDbType.VarChar,
                        Value         = "Save"
                    });

                    connection.Open();
                    var r = cmd.ExecuteNonQuery();
                    return(true);
                }
            }
            return(false);
        }
Ejemplo n.º 35
0
 public Availability Add(Availability entity, object?userId = null)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 36
0
        public static Availability GetAvailability(string conStr)
        {
            Availability avail = new Availability();

            using (SqlConnection connection = new SqlConnection(conStr))
            {
                User curUser = User.CurrentUser;
                //long subId = -1;
                //switch (curUser.Type)
                //{
                //    case EntityType.Tutor:
                //        subId = ((TutorProfile)curUser).Id;
                //        break;
                //    case EntityType.Student:
                //        subId = ((Student)curUser).Id;
                //        break;
                //    case EntityType.Parent:
                //        subId = ((Parent)curUser).Id;
                //        break;
                //    case EntityType.School:
                //        subId = ((School)curUser).Id;
                //        break;
                //}

                SqlCommand cmd = new SqlCommand("sp_ManageAvailability", connection);
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.Add(new SqlParameter
                {
                    ParameterName = "@UId",
                    SqlDbType     = SqlDbType.BigInt,
                    Value         = curUser.UserId
                });

                cmd.Parameters.Add(new SqlParameter
                {
                    ParameterName = "@ObjEntityId",
                    SqlDbType     = SqlDbType.TinyInt,
                    Value         = (byte)curUser.Type
                });;

                cmd.Parameters.Add(new SqlParameter
                {
                    ParameterName = "@Mode",
                    SqlDbType     = SqlDbType.VarChar,
                    Value         = "GetAvailability"
                });

                connection.Open();
                SqlDataReader reader = cmd.ExecuteReader();
                if (reader.HasRows)
                {
                    while (reader.Read())
                    {
                        avail.Days.AsEnumerable <AvailabilityDay>().Where <AvailabilityDay>(d => d.Day.Index == reader.GetByte(2)).SingleOrDefault <AvailabilityDay>().Add(new TimeLimit {
                            From = new TimePoint {
                                Index = reader.GetByte(3), Value = TimePoint.Times[reader.GetByte(3)].Value
                            }, To = new TimePoint {
                                Index = reader.GetByte(4), Value = TimePoint.Times[reader.GetByte(4)].Value
                            }, Extra = new TimeLimitExtra {
                                PhoneCall = reader.GetBoolean(5), OnlineSession = reader.GetBoolean(6), FaceToFace = reader.GetBoolean(7)
                            }
                        });
                    }
                }
            }

            return(avail);
        }
 public void OnStatusChanged(string provider, Availability status, Bundle extras)
 {
     Log.Debug(_tag, provider + " availability has changed to " + status);
 }
Ejemplo n.º 38
0
 public void OnStatusChanged(string provider, Availability status, Bundle extras)
 {
     //throw new NotImplementedException();
 }
Ejemplo n.º 39
0
 public void SetPresence(Availability status, string message)
 {
     SetPresence (status, message, 1);
 }
Ejemplo n.º 40
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="provider"></param>
 /// <param name="status"></param>
 /// <param name="extras"></param>
 public void OnStatusChanged(string provider, [GeneratedEnum] Availability status, Bundle extras)
 {
     StopLocationUpdates();
     StartLocationUpdates();
 }
Ejemplo n.º 41
0
 public void OnStatusChanged(string provider, Availability status, Bundle extras)
 {
     //Toast.MakeText(this, "OnStatusChanged", ToastLength.Short).Show ();//...
 }
Ejemplo n.º 42
0
 // Add an Availability
 public void Add(Availability availability)
 {
     _context.Availability.Add(availability);
     _context.SaveChanges();
 }
Ejemplo n.º 43
0
		public void OnStatusChanged (string provider, Availability status, Bundle extras)
		{
			Log.Debug (TAG, "{0}, {1}", provider, status);
		}
Ejemplo n.º 44
0
 public List <ProductModel> GetAll(Availability availability = Availability.All, string productName = "", int skip = 0, int count = 0)
 {
     return(_dataManager.Products.GetAll(false,
                                         GetExpressionByAvailability(availability, productName), skip, count)
            .Select(ProductDbToModel).ToList());
 }
 public void OnStatusChanged(string provider, Availability status, Bundle extras)
 {
     _owner.OnStatusChanged(provider, status, extras);
 }
Ejemplo n.º 46
0
 public void OnStatusChanged(string provider, Availability status, Bundle extras)
 {
     locationLabel.Text = "Provider status changed";
 }
 public void SetAvailability(Availability availability)
 {
     var user = Core.Utility.Storage.Repository<Guid, IPresence>.GetById(this.PersistentId);
     user.Availability = availability;
     SavePresence(user);            
 }
Ejemplo n.º 48
0
 public void OnStatusChanged(string provider, Availability status, Bundle extras)
 {
 }
Ejemplo n.º 49
0
 /// <summary>
 /// Sets the availability status.
 /// </summary>
 /// <param name="availability">The availability state. Can be one of the
 /// values from the Availability enumeration, however not
 /// Availability.Offline.</param>
 /// <param name="message">An optional message providing a detailed
 /// description of the availability state.</param>
 /// <param name="priority">Provides a hint for stanza routing.</param>
 /// <param name="language">The language of the description of the
 /// availability state.</param>
 /// <exception cref="ArgumentException">The availability parameter has a
 /// value of Availability.Offline.</exception>
 /// <exception cref="IOException">There was a failure while writing to or reading
 /// from the network.</exception>
 /// <exception cref="InvalidOperationException">The XmppClient instance is not
 /// connected to a remote host, or the XmppClient instance has not authenticated with
 /// the XMPP server.</exception>
 /// <exception cref="ObjectDisposedException">The XmppClient object has been
 /// disposed.</exception>
 public void SetStatus(Availability availability, string message = null,
     sbyte priority = 0, CultureInfo language = null)
 {
     AssertValid();
     im.SetStatus(availability, message, 0, language);
 }
Ejemplo n.º 50
0
 public Task <Availability> RemoveAsync(Availability entity, object?userId = null)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 51
0
		public void OnStatusChanged (string provider, Availability status, Bundle extras)
		{
			Toast.MakeText(this, "Provider status"  + status.ToString(),ToastLength.Short).Show();
		}
Ejemplo n.º 52
0
        public void AddMemberAvailability(int memberId, Availability availability)
        {
            var member = GetMember(memberId, false);

            member.Availabilities.Add(availability);
        }
Ejemplo n.º 53
0
		/// <summary>
		/// Called when the status of the location listener changed.
		/// </summary>
		/// <param name="provider">the name of the location provider associated with this
		///  update.</param>
		/// <param name="status">Status.</param>
		/// <param name="extras">Extras.</param>
		public void OnStatusChanged (string provider, Availability status, Bundle extras)
		{
			// TODO: Remove
			Console.WriteLine ("Status changed: {0} is {1}",provider,status.ToString());
		}
Ejemplo n.º 54
0
 public void OnStatusChanged(string provider, Availability status, Bundle extras)
 {
     Log.Debug(TAG, "{0}, {1}", provider, status);
 }
Ejemplo n.º 55
0
 public int GetCount(Availability availability = Availability.All, string productName = "")
 {
     return(_dataManager.Products.GetCount(GetExpressionByAvailability(availability, productName)));
 }
Ejemplo n.º 56
0
 public Vape(string Name, string prodState, int rating, VapeType vapeT, string imgURL, int price, string descript, Availability avail, int count)
 {
     this.Name        = Name;
     this.StateProd   = prodState;
     this.Rating      = rating;
     this.Type        = vapeT;
     this.ImageURL    = imgURL;
     this.Price       = price;
     this.Description = descript;
     this.Avail       = avail;
     this.Count       = count;
 }
 public void OnStatusChanged(string provider, Availability status, Bundle extras)
 {
     switch (status)
     {
         case Availability.Available:
             break;
         case Availability.OutOfService:
         case Availability.TemporarilyUnavailable:
             SendError(MvxLocationErrorCode.PositionUnavailable);
             break;
         default:
             throw new ArgumentOutOfRangeException("status");
     }
 }
Ejemplo n.º 58
0
 public void OnStatusChanged(string provider, Availability status, Bundle extras)
 {
     //TO DO:
 }
Ejemplo n.º 59
0
 public void OnStatusChanged(string provider, Availability status, Bundle extras)
 {
     // throw new NotImplementedException();
 }
Ejemplo n.º 60
0
 public void DeleteAvailability(Availability availability)
 {
     _context.Availabilities.Remove(availability);
 }