Пример #1
0
        public override void CopyFrom(object obj)
        {
            if (obj is Recur)
            {
                Recur r = (Recur)obj;

                Frequency = r.Frequency;
                Until = r.Until;
                Count = r.Count;
                Interval = r.Interval;
                BySecond = new ArrayList(r.BySecond);
                ByMinute = new ArrayList(r.ByMinute);
                ByHour = new ArrayList(r.ByHour);
                ByDay = new ArrayList(r.ByDay);
                ByMonthDay = new ArrayList(r.ByMonthDay);
                ByYearDay = new ArrayList(r.ByYearDay);
                ByWeekNo = new ArrayList(r.ByWeekNo);
                ByMonth = new ArrayList(r.ByMonth);
                BySetPos = new ArrayList(r.BySetPos);
                Wkst = r.Wkst;
            }            
        }
Пример #2
0
        /// <summary>
        /// Gets the start date for an autoOrders with the provided frequency type.
        /// </summary>
        /// <param name="frequency">How often the autoOrder will run</param>
        /// <returns>The start date for an autoOrder</returns>
        public static DateTime GetAutoOrderStartDate(FrequencyType frequency)
        {
            DateTime autoOrderStartDate = new DateTime();
            var now = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day);

            switch (frequency)
            {
                case FrequencyType.Weekly: autoOrderStartDate = now.AddDays(7); break;
                case FrequencyType.BiWeekly: autoOrderStartDate = now.AddDays(14); break;
                case FrequencyType.EveryFourWeeks: autoOrderStartDate = now.AddDays(28); break;
                case FrequencyType.Monthly: autoOrderStartDate = now.AddMonths(1); break;
                case FrequencyType.BiMonthly: autoOrderStartDate = now.AddMonths(2); break;
                case FrequencyType.Quarterly: autoOrderStartDate = now.AddMonths(3); break;
                case FrequencyType.SemiYearly: autoOrderStartDate = now.AddMonths(6); break;
                case FrequencyType.Yearly: autoOrderStartDate = now.AddYears(1); break;
                default: autoOrderStartDate = now; break;
            }

            // Ensure we are not returning a day of 29, 30 or 31.
            autoOrderStartDate = GetNextAvailableAutoOrderStartDate(autoOrderStartDate);

            return autoOrderStartDate;
        }
Пример #3
0
		public static string GetFrequencyDisplay(FrequencyType freqType,List<Benefit> benList) {
			string retVal="";
			for(int i=0;i<benList.Count;i++){
				switch(freqType) {
					case FrequencyType.BW:
						if(ProcedureCodes.GetStringProcCode(benList[i].CodeNum)=="D0274"//4BW
						&& benList[i].BenefitType==InsBenefitType.Limitations
						//&& ben.CovCatNum==CovCats.GetForEbenCat(EbenefitCategory.Db).CovCatNum//ignored
						&& benList[i].MonetaryAmt==-1
						&& benList[i].PatPlanNum==0
						&& benList[i].Percent==-1
						&& (benList[i].QuantityQualifier==BenefitQuantity.Months 
							|| benList[i].QuantityQualifier==BenefitQuantity.Years
							|| benList[i].QuantityQualifier==BenefitQuantity.NumberOfServices))
						//&& ben.TimePeriod might be none, or calYear, or ServiceYear, or Years.
						{
							if(benList[i].QuantityQualifier==BenefitQuantity.Months) {
								if(benList[i].Quantity==1) {
									retVal+=Lans.g(null,"Once every month.\r\n");
								}
								else {
									retVal+=Lans.g(null,"Once every ")+benList[i].Quantity+Lans.g(null," months.\r\n");
								}
							}
							else if(benList[i].QuantityQualifier==BenefitQuantity.Years) {
								if(benList[i].Quantity==1) {
									retVal+=Lans.g(null,"Once every year.\r\n");
								}
								else {
									retVal+=Lans.g(null,"Once every ")+benList[i].Quantity+Lans.g(null," years.\r\n");
								}
							}
							else {
								if(benList[i].Quantity==1) {
									retVal+=Lans.g(null,"Once per year.\r\n");
								}
								else {
									retVal+=benList[i].Quantity+Lans.g(null," times per year.\r\n");
								}
							}
						}
						continue;
					case FrequencyType.PanoFMX:
						if(ProcedureCodes.GetStringProcCode(benList[i].CodeNum)=="D0330"//Pano
						&& benList[i].BenefitType==InsBenefitType.Limitations
						//&& ben.CovCatNum==CovCats.GetForEbenCat(EbenefitCategory.Db).CovCatNum//ignored
						&& benList[i].MonetaryAmt==-1
						&& benList[i].PatPlanNum==0
						&& benList[i].Percent==-1
						&& (benList[i].QuantityQualifier==BenefitQuantity.Months 
							|| benList[i].QuantityQualifier==BenefitQuantity.Years
							|| benList[i].QuantityQualifier==BenefitQuantity.NumberOfServices))
							//&& ben.TimePeriod might be none, or calYear, or ServiceYear, or Years.
						{
							if(benList[i].QuantityQualifier==BenefitQuantity.Months) {
								if(benList[i].Quantity==1) {
									retVal+=Lans.g(null,"Once every month.\r\n");
								}
								else {
									retVal+=Lans.g(null,"Once every ")+benList[i].Quantity+Lans.g(null," months.\r\n");
								}
							}
							else if(benList[i].QuantityQualifier==BenefitQuantity.Years) {
								if(benList[i].Quantity==1) {
									retVal+=Lans.g(null,"Once every year.\r\n");
								}
								else {
									retVal+=Lans.g(null,"Once every ")+benList[i].Quantity+Lans.g(null," years.\r\n");
								}
							}
							else {
								if(benList[i].Quantity==1) {
									retVal+=Lans.g(null,"Once per year.\r\n");
								}
								else {
									retVal+=benList[i].Quantity+Lans.g(null," times per year.\r\n");
								}
							}
						}
						continue;
					case FrequencyType.Exam:
						if(benList[i].CodeNum==0
						&& benList[i].BenefitType==InsBenefitType.Limitations
						&& CovCats.GetForEbenCat(EbenefitCategory.RoutinePreventive)!=null
						&& benList[i].CovCatNum==CovCats.GetForEbenCat(EbenefitCategory.RoutinePreventive).CovCatNum
						&& benList[i].MonetaryAmt==-1
						&& benList[i].PatPlanNum==0
						&& benList[i].Percent==-1
						&& (benList[i].QuantityQualifier==BenefitQuantity.Months 
							|| benList[i].QuantityQualifier==BenefitQuantity.Years
							|| benList[i].QuantityQualifier==BenefitQuantity.NumberOfServices))
							//&& ben.TimePeriod might be none, or calYear, or ServiceYear, or Years.
						{
							if(benList[i].QuantityQualifier==BenefitQuantity.Months) {
								if(benList[i].Quantity==1) {
									retVal+=Lans.g(null,"Once every month.\r\n");
								}
								else {
									retVal+=Lans.g(null,"Once every ")+benList[i].Quantity+Lans.g(null," months.\r\n");
								}
							}
							else if(benList[i].QuantityQualifier==BenefitQuantity.Years) {
								if(benList[i].Quantity==1) {
									retVal+=Lans.g(null,"Once every year.\r\n");
								}
								else {
									retVal+=Lans.g(null,"Once every ")+benList[i].Quantity+Lans.g(null," years.\r\n");
								}
							}
							else {
								if(benList[i].Quantity==1) {
									retVal+=Lans.g(null,"Once per year.\r\n");
								}
								else {
									retVal+=benList[i].Quantity+Lans.g(null," times per year.\r\n");
								}
							}
						}
						continue;
				}//end switch
			}//end i loop
			return retVal;
		}
Пример #4
0
 public TickRRule(FrequencyType type)
 {
     //RRule = new RecurrencePattern(type);
 }
Пример #5
0
 public void SetFreq(FrequencyType freq)
 {
     //RRule.Frequency = freq;
 }
Пример #6
0
 public Frequency()
 {
     _FrequencyType = FrequencyType.Day;
 }
Пример #7
0
 public void SetFrequencyType(FrequencyType type)
 {
     FrequencyType = type;
 }
Пример #8
0
        private void UpdateSystemChore(int childId, int systemChoreId, string choreName, decimal choreValue, FrequencyType frequencyType)
        {
            var systemChore = Repository.Table <SystemChore>().Where(p => p.Id.Equals(systemChoreId)).SingleOrDefault();

            if (!systemChore.Name.Equals(choreName) || !systemChore.Value.Equals(choreValue) || !systemChore.FrequencyType.Equals(frequencyType))
            {
                var existingSystemChore = Repository.Table <SystemChore>().Where(p => p.ParentSystemChoreId == systemChoreId && p.ChildId == childId).SingleOrDefault();
                if (existingSystemChore != null)
                {
                    existingSystemChore.Name          = choreName;
                    existingSystemChore.Value         = choreValue;
                    existingSystemChore.FrequencyType = frequencyType;
                    Repository.Update(existingSystemChore);
                }
                else
                {
                    var chore = new SystemChore();
                    chore.Name                = choreName;
                    chore.Value               = choreValue;
                    chore.StartAge            = systemChore.StartAge;
                    chore.EndAge              = systemChore.EndAge;
                    chore.ImageUrl            = systemChore.ImageUrl;
                    chore.FrequencyType       = frequencyType;
                    chore.ChildId             = childId;
                    chore.ParentSystemChoreId = systemChoreId;
                    Repository.Insert(chore);
                }
            }
        }
Пример #9
0
        static public void AddNewEvent(iCalendar iCal, EventInfo ei)
        {
            Event evt = iCal.Create <Event>();

            if (ei.Pattern != null)
            {
                evt.DTStart = new iCalDateTime(ei.Pattern.BeginDate.Year, ei.Pattern.BeginDate.Month, ei.Pattern.BeginDate.Day, ei.Begin.Hour, ei.Begin.Minute, ei.Begin.Second);
                evt.DTEnd   = new iCalDateTime(ei.Pattern.BeginDate.Year, ei.Pattern.BeginDate.Month, ei.Pattern.BeginDate.Day, ei.End.Hour, ei.End.Minute, ei.End.Second);
            }
            else
            {
                evt.DTStart = new iCalDateTime(ei.Begin.Year, ei.Begin.Month, ei.Begin.Day, ei.Begin.Hour, ei.Begin.Minute, ei.Begin.Second);
                evt.DTEnd   = new iCalDateTime(ei.End.Year, ei.End.Month, ei.End.Day, ei.End.Hour, ei.End.Minute, ei.End.Second);
            }
            //evt.Description = "#Disc:" + ei.Discipline + "#Type:" + ei.Type + "#Teacher:" + ei.Teacher + "#IsMoved:" + ei.IsMoved.ToString();

            evt.Properties.Add(new CalendarProperty("Название дисциплины", ei.Discipline));
            evt.Properties.Add(new CalendarProperty("Короткое название дисциплины", ei.DisciplineShort));
            evt.Properties.Add(new CalendarProperty("Тип занятия", ei.Type));
            evt.Properties.Add(new CalendarProperty("Полное имя преподавателя", ei.Teacher.Name));
            evt.Properties.Add(new CalendarProperty("ФИО преподавателя", ei.Teacher.ShortName));
            evt.Properties.Add(new CalendarProperty("Группы", ei.CalcUnit));

            evt.Location = ei.Room;
            evt.Summary  = ei.DisciplineShort + ", " + ei.Type + ", " + ei.CalcUnit + ", " + ei.Teacher.ShortName + ", " + ei.Room;

            PeriodList pl = new PeriodList();

            if (ei.Exceptions != null)
            {
                foreach (DateTime dt in ei.Exceptions)
                {
                    pl.Add(new Period(new DDay.iCal.iCalDateTime(dt)));
                }
            }

            if (pl.Count > 0)
            {
                evt.ExceptionDates.Add(pl);
            }

            //if (ei.IsMoved) evt.Summary = evt.Summary + " Перенесено.";

            if (ei.Pattern != null)
            {
                FrequencyType ft = FrequencyType.None;

                switch (ei.Pattern.Type)
                {
                case 1: ft = FrequencyType.Daily;
                    break;

                case 2: ft = FrequencyType.Weekly;
                    break;

                case 3: ft = FrequencyType.Monthly;
                    break;
                }

                RecurrencePattern rp = new RecurrencePattern(ft, ei.Pattern.Frequency);

                List <WeekDay> wdList = GetDayFromMask(ei.Pattern.RepeatMask);
                foreach (WeekDay wd in wdList)
                {
                    rp.ByDay.Add(wd);
                }

                rp.Until = ei.Pattern.EndDate;

                evt.RecurrenceRules.Add(rp);
            }
        }
Пример #10
0
 public ActiveRFID(ulong id, FrequencyType frequency, bool isReadOnly, bool isWriteOnce, BatteryType battery)
     : base(id, frequency, isReadOnly, isWriteOnce)
 {
     this.battery = battery;
 }
        public ActionResult AutoOrder(DateTime autoOrderStartDate, FrequencyType autoOrderFrequencyType)
        {
            PropertyBag.AutoOrderStartDate = autoOrderStartDate.ToLocalTime();
            PropertyBag.AutoOrderFrequencyType = autoOrderFrequencyType;
            Exigo.PropertyBags.Update(PropertyBag);

            return LogicProvider.GetNextAction();
        }
Пример #12
0
 public RecurrencePatternBase(FrequencyType frequencyType)
 {
     FrequencyType = frequencyType;
 }
Пример #13
0
        public static void AssetReadingImportExample(DataToken dataToken)
        {
            DataToken = dataToken;

            // Use first or default if you want the first result but there could be 0+ results. Use Single Or Default if there should only be 1 or 0 results
            Asset asset = DataToken.Assets.Where(a => a.AssetNumber == "ADMIN").FirstOrDefault();

            if (asset == null)
            {
                // Put code here for if the asset doesn't exist in MEX
                return;
            }

            // Get the frequency type. If you want you can find the ID before hand and use the ID instead of the frequency type name
            FrequencyType frequencyType = DataToken.FrequencyTypes.Where(ft => ft.FrequencyTypeName == "Hours").SingleOrDefault();

            if (frequencyType == null)
            {
                //Put code here for if the frequency type doesn't exist.
                return;
            }

            AssetReading assetReading = DataToken.AssetReadings.Where(ar => ar.AssetID == asset.AssetID && ar.FrequencyTypeID == frequencyType.FrequencyTypeID).FirstOrDefault();

            if (assetReading == null)
            {
                // Create a new Asset Reading. When I create things with the API I use ContactID -1 so it is obvious.
                assetReading = AssetReading.CreateAssetReading(0, asset.AssetID, frequencyType.FrequencyTypeID, 0, 0, "0", true, -1, DateTime.Now, -1, DateTime.Now);
                // Because this is a new record, it has to be added to the dataservice so it knows to track it.
                DataToken.AddToAssetReadings(assetReading);

                // Commit it to the database so it can be used
                DataToken.SaveChanges();
            }

            // Change between adding the line directly in the database, or going through a service operation
            bool processRequest = true;

            if (processRequest)
            {
                //********************* Code for going through the Service Op **************************//


                // The reading you are pushing to MEX
                double newReading = 123;
                // Need to know if you are going to update all the components of the asset as well.
                bool updateComponents = false;
                // If you want mex to validate hours set this to false.
                bool disregardValidateHours = true;
                // If a reading exists for that datetime, should it be overridden
                bool overrideOldReading = true;
                // If this is true it will prompt you before making the changes if an identical record exists.
                // I'm not 100% sure on how this works, so I would suggest leaving this as false.
                bool checkForIdentical = false;

                // Construct the request. The first parameter of 'AddQueryOption' is the parameter name in MEX, and the second is the value to set it to.
                var request = DataToken.CreateQuery <ODataFunctionImportQueryableData>("ProcessReading")
                              .AddQueryOption("pFrequencyTypeID", frequencyType.FrequencyTypeID)
                              .AddQueryOption("pNewReading", $"'{newReading}'")
                              .AddQueryOption("pCompletedDateTime", $"'{DateTime.Now}'")
                              .AddQueryOption("pAssetID", asset.AssetID)
                              .AddQueryOption("pIsUpdateComponents", $"'{updateComponents}'")
                              .AddQueryOption("pCreatedContactID", -1)
                              .AddQueryOption("pIsDisregardHoursValidation", $"'{disregardValidateHours}'")
                              .AddQueryOption("pIsOverwriteOldReading", $"'{overrideOldReading}'")
                              .AddQueryOption("pCheckIdentical", $"'{checkForIdentical}'")
                              .AddQueryOption("pLanguageNameID", 1);           // This will probably always be 1. But you can find out by querying the DB to find the languageID for english

                // Execute the request
                var result = request.Execute().FirstOrDefault();
                // Log the result
                Console.WriteLine(result);

                // Pause the app so you can see the result
                Console.ReadKey();
            }
            else
            {
                //********************* Code for going directly Inserting Data **************************//

                // The current reading on the meter
                decimal enteredReading = 50;

                // The total reading that this asset.
                // EG if a meter was reset to 0 after 150 hours, and was back up to 50 hours, total reading would be 200
                decimal totalReading = 200;

                // If you have replaced a meter and this is resetting the reading, set this to true
                bool isReset = false;

                AssetReadingLine arl = AssetReadingLine.CreateAssetReadingLine(0, assetReading.AssetReadingID, DateTime.Now, enteredReading, totalReading, isReset, -1, DateTime.Now, -1, DateTime.Now);

                DataToken.AddToAssetReadingLines(arl);
                DataToken.SaveChanges();
            }
        }
Пример #14
0
 public FrequencyChart(ArrayList list, FrequencyType type)
 {
     InitializeComponent();
     LoadData(list, type);
 }
Пример #15
0
 public FrequencyChart(DataTable dt, FrequencyType type)
 {
     InitializeComponent();
     LoadData(dt,type);
 }
Пример #16
0
 public void LoadData(ArrayList list, FrequencyType type)
 {
     dataList =list;
     if (type == FrequencyType.SYS_TYPE)
         xLabel = "SYS:mmHg";
     if (type == FrequencyType.DIA_TYPE)
         xLabel = "DIA:mmHg";
     if (type == FrequencyType.MAP_TYPE)
         xLabel = "MAP:mmHg";
     if (type == FrequencyType.HR_TYPE)
         xLabel = "HeartRate:BPM";
     InitDataToChart();
 }
Пример #17
0
 public static FrequencyType CreateFrequencyType(int frequencyTypeID)
 {
     FrequencyType frequencyType = new FrequencyType();
     frequencyType.FrequencyTypeID = frequencyTypeID;
     return frequencyType;
 }
Пример #18
0
 public static DisplaySet <FrequencyType> GetDisplay(FrequencyType frequency)
 {
     return(Frequencies.Find(x => x.EnumOption == frequency));
 }
 public RecurrencePattern(FrequencyType frequency, int interval) : this()
 {
     Frequency = frequency;
     Interval  = interval;
 }
Пример #20
0
 public ScheduleBuilder HavingFrequency(FrequencyType type)
 {
     this.HavingFrequency((int)type);
     return(this);
 }
Пример #21
0
        /// <summary>
        /// Gets price history for a symbol.
        /// </summary>
        /// <param name="symbol">
        /// The symbol to get price history for.
        /// </param>
        /// <param name="periodType">
        /// The type of period to show.
        /// </param>
        /// <param name="period">
        /// The number of periods to show.
        /// </param>
        /// <param name="frequencyType">
        /// The type of frequency with which a new candle is formed.
        /// </param>
        /// <param name="frequency">
        /// The number of the <paramref name="frequencyType"/> to be included in each candle.
        /// </param>
        /// <returns>
        /// The price history for a symbol.
        /// </returns>
        public async Task <PriceHistory> GetPriceHistoryAsync(string symbol, PeriodType periodType, int period, FrequencyType frequencyType, int frequency)
        {
            ThrowIfRefreshTokenExpired();

            await TryUpdateTokensAsync();

            var json = await _dataProvider.GetPriceHistoryJsonAsync(symbol, periodType, period, frequencyType, frequency, _accessToken.Value);

            return(DeserializePriceHistoryJson(json));
        }
Пример #22
0
        /// <summary>
        /// Set the light frequency of camera
        /// </summary>
        /// <param name="lightFrequency">Light frequency (50Hz / 60 Hz)</param>
        /// <returns>True if succeeded</returns>
        public bool LigtFrequency(FrequencyType lightFrequency)
        {
            // Create 'Light Frequency' command
            command[0] = CMD_PREFIX;
            command[1] = CMD_LIGHTFREQ;
            command[2] = (byte)lightFrequency;
            command[3] = 0x00;
            command[4] = 0x00;
            command[5] = 0x00;

            // Send 'Light Frequency' command
            SendCommand(command);

            // Receive ACK
            if (!ReceiveACK(CMD_LIGHTFREQ)) //100
                return false;

            return true;
        }
Пример #23
0
 public RecurrencePattern(FrequencyType frequency)
     : this(frequency, 1)
 {
 }
Пример #24
0
 /// <summary>
 /// Gets the recurring chores based on given recurrence type.
 /// </summary>
 /// <param name="recurrenceType">The recurrence type.</param>
 /// <returns>The recurring chores.</returns>
 public IQueryable <Chore> GetRecurringChores(FrequencyType recurrenceType)
 {
     return(Repository.Table <Chore>().Where(p => p.FrequencyType == recurrenceType && p.ChoreStatus == ChoreStatus.Active && !p.RecurringChoreID.HasValue &&
                                             !p.IsDeleted && !p.FamilyMember.IsDeleted));
 }
Пример #25
0
 public void SetLunarFrequency(FrequencyType lunarFrequency)
 {
     //RRule.Frequency = lunarFrequency;
     // TODO 没有Name属性 RRule.Name = LUNAR_RRULE_NAME;
     IsLunar = true;
 }
Пример #26
0
        public static Guid GetIDByFrequencyType(FrequencyType contentType)
        {
            KeyValuePair <Guid, string> _type = FrequencyTypeDictionary.Where(t => t.Value.ToLower() == contentType.ToString().ToLower()).FirstOrDefault();

            return(_type.Key);
        }
Пример #27
0
        public DateTime[] GetRange(FrequencyType frequency, DateTime dateToCheck)
        {
            DateTime[] result = new DateTime[2];
            DateTime dateRangeBegin = dateToCheck;
            TimeSpan duration = new TimeSpan(0, 0, 0, 0); //One day 
            DateTime dateRangeEnd = DateTime.Today.Add(duration);

            switch (frequency)
            {
                case FrequencyType.Daily:
                    dateRangeBegin = dateToCheck;
                    dateRangeEnd = dateRangeBegin;
                    break;

                case FrequencyType.Weekly:
                    //dateRangeBegin = dateToCheck.AddDays(-(int)dateToCheck.DayOfWeek);
                    //dateRangeEnd = dateToCheck.AddDays(6 - (int)dateToCheck.DayOfWeek);


                    dateRangeBegin = dateToCheck.AddDays(-6);
                    dateRangeEnd = dateToCheck.AddDays(0);
                    break;

                case FrequencyType.Monthly:
                    duration = new TimeSpan(DateTime.DaysInMonth(dateToCheck.Year, dateToCheck.Month) - 1, 0, 0, 0);
                    dateRangeBegin = dateToCheck.AddDays((-1) * dateToCheck.Day + 1);
                    dateRangeEnd = dateRangeBegin.Add(duration);
                    break;

                case FrequencyType.Quarterly:
                    int currentQuater = (dateToCheck.Date.Month - 1) / 3 + 1;
                    int daysInLastMonthOfQuarter = DateTime.DaysInMonth(dateToCheck.Year, 3 * currentQuater);
                    dateRangeBegin = new DateTime(dateToCheck.Year, 3 * currentQuater - 2, 1);
                    dateRangeEnd = new DateTime(dateToCheck.Year, 3 * currentQuater, daysInLastMonthOfQuarter);
                    break;

                case FrequencyType.Annually:
                    dateRangeBegin = new DateTime(dateToCheck.Year, 1, 1);
                    dateRangeEnd = new DateTime(dateToCheck.Year, 12, 31);
                    break;
            }
            result[0] = dateRangeBegin.Date;
            result[1] = dateRangeEnd.Date;
            return result;
        }
Пример #28
0
        public static void UpdateCustomerAutoOrderRunDate(int customerID, int autoOrderID, DateTime rundate, FrequencyType frequency)
        {
            // Get the autoorder
            var autoOrder = Exigo.GetCustomerAutoOrder(customerID, autoOrderID);

            if (autoOrder == null)
            {
                return;
            }

            // Re-create the autoorder
            var request = GetCreateOverridenAutoOrderRequest(customerID, autoOrderID);

            request.StartDate = rundate;

            request.Frequency = FrequencyType.Monthly;

            // Update the autoorder
            var response = Exigo.WebService().CreateAutoOrder(request);
        }
Пример #29
0
 public RFID(ulong id, FrequencyType frequency, bool isReadOnly, bool isWriteOnce) : base(id)
 {
     this.frequency   = frequency;
     this.isReadOnly  = isReadOnly;
     this.isWriteOnce = isWriteOnce;
 }
Пример #30
0
 public void AddToFrequencyTypes(FrequencyType frequencyType)
 {
     base.AddObject("FrequencyTypes", frequencyType);
 }
		public static Guid GetIDByFrequencyType(FrequencyType contentType) {
			KeyValuePair<Guid, string> _type = FrequencyTypeDictionary.Where(t => t.Value.ToLower() == contentType.ToString().ToLower()).FirstOrDefault();

			return _type.Key;
		}
Пример #32
0
 public void LoadData(DataTable dt, FrequencyType type)
 {
     dataList = new ArrayList();
     if (type == FrequencyType.SYS_TYPE)
     {
         xLabel = "SYS:mmHg";
         foreach (DataRow row in dt.Rows)
         {
             dataList.Add(Convert.ToDouble(row["SYS"].ToString()));
         }
     }
     if (type == FrequencyType.DIA_TYPE)
     {
         xLabel = "DIA:mmHg";
         foreach (DataRow row in dt.Rows)
         {
             dataList.Add(Convert.ToDouble(row["DIA"].ToString()));
         }
     }
     if (type == FrequencyType.MAP_TYPE)
     {
         xLabel = "MAP:mmHg";
         foreach (DataRow row in dt.Rows)
         {
             dataList.Add(Convert.ToDouble(row["MAP"].ToString()));
         }
     }
     if (type == FrequencyType.HR_TYPE)
     {
         xLabel = "HeartRate:BPM";
         foreach (DataRow row in dt.Rows)
         {
             dataList.Add(Convert.ToDouble(row["HeartRate"].ToString()));
         }
     }
     InitDataToChart();
 }