public IYahooResource WithCoverageType(CoverageType coverageType, int value) { var coverage = coverageType.ToString().ToLower(); _uri += $";type={coverage};{coverage}={value}"; return(this); }
/// <summary> /// Initializes a new instance of the <see cref="Coverage"/> class. /// </summary> /// <param name="coverageType"> /// The coverage type /// </param> /// <param name="limit"> /// The Coverage Limit /// </param> /// <param name="deductible"> /// The Coverage Deductible /// </param> /// <param name="vehicleId"> /// The vehicle Id. /// </param> public Coverage(CoverageType coverageType, Limit limit, Deductible deductible, int vehicleId) { this.CoverageType = coverageType; this.Limit = limit; this.Deductible = deductible; this.VehicleId = vehicleId; }
public void Validate() { PlanName.ValidateRequired("PlanName"); CoverageType.ValidateOptional("CoverageType"); SubscriberDob.ValidateOptional("SubscriberDob"); IsPrimary.ValidateOptional("IsPrimary"); ExpirationDate.ValidateOptional("ExpirationDate"); Contact.ValidateOptional("Contact"); }
public CoverageEditorFormatDefinition( string identifier, IEditorFormatMapCoverageColoursManager editorFormatMapCoverageColoursManager, CoverageType coverageType) { Identifier = identifier; CoverageType = coverageType; editorFormatMapCoverageColoursManager.Register(this); }
private void BuildInMemoryData() { //default plan: var planDetails1 = new PlanDetail { ServiceCode = "Plan Detail - 1", ServiceName = "Surgery One" }; var planDetails2 = new PlanDetail { ServiceCode = "Plan Detail - 2", ServiceName = "Surgery Two" }; var planDetails3 = new PlanDetail { ServiceCode = "Plan Detail - 3", ServiceName = "Surgery Three" }; var planDetails4 = new PlanDetail { ServiceCode = "Plan Detail - 4", ServiceName = "Surgery Four" }; var planOne = new Plan { Name = "Plan - One", CoPayPercent = 10, CoverageType = "Medical", DeductiblePercent = 50, EffectiveStartDate = "2019-10-10", EffectiveEndDate = "2020-10-09" }; planOne.PlanDetails.Add(planDetails1); planOne.PlanDetails.Add(planDetails2); var planTwo = new Plan { Name = "Plan - Two", CoPayPercent = 20, CoverageType = "Medical", DeductiblePercent = 40, EffectiveStartDate = "2019-11-20", EffectiveEndDate = "2020-11-19" }; planTwo.PlanDetails.Add(planDetails3); planTwo.PlanDetails.Add(planDetails4); var coverageTypeOne = new CoverageType { Name = "Medical", Plans = new List <Plan>() { planOne } }; var coverageTypeTwo = new CoverageType { Name = "Other", Plans = new List <Plan>() { planTwo } }; if (!_context.Benefits.Any()) { _context.Benefits.AddRange ( new Benefit { Plan = planOne, MemberId = "12345", SubscriberId = "1001", DateOfService = "2019-08-10", EligStatus = "eligible", CoverageType = coverageTypeOne } , new Benefit { Plan = planTwo, MemberId = "12346", SubscriberId = "1002", DateOfService = "2019-08-15", EligStatus = "eligible", CoverageType = coverageTypeTwo } ); } _context.SaveChanges(); }
public IEnumerable <CoverageType> Get(CoverageType entity) { List <Models.CoverageType> coverageTypes = null; if (entity == null) { coverageTypes = _context.CoverageTypes.ToList(); } return(mapping.Map <IEnumerable <CoverageType> >(coverageTypes)); }
public async Task <YahooTeamApiResult> GetTeamStats(string teamKey, CoverageType coverageType, int filter) { var uri = _uriBuilder .WithBaseResource(BaseResource.Team) .WithKey(teamKey) .WithResource("stats") .WithCoverageType(coverageType, filter) .Build(); var teamResult = await CallYahooFantasyApi <YahooTeamApiResult>(uri); return(teamResult as YahooTeamApiResult); }
public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer) { if (untypedValue == null) { serializer.Serialize(writer, value: null); return; } CoverageType value = (CoverageType)untypedValue; if (value == CoverageType.Date) { serializer.Serialize(writer, "date"); return; } throw new Exception("Cannot marshal type CoverageType"); }
private Brush GetBrush(CoverageType coverageType) { Color color = default; switch (coverageType) { case CoverageType.Partial: color = coverageColours.CoveragePartiallyTouchedArea; break; case CoverageType.NotCovered: color = coverageColours.CoverageNotTouchedArea; break; case CoverageType.Covered: color = coverageColours.CoverageTouchedArea; break; } return(new SolidColorBrush(color)); }
public bool Show(CoverageType coverageType) { var shouldShow = false; switch (coverageType) { case CoverageType.Covered: shouldShow = ShowCoveredInOverviewMargin; break; case CoverageType.NotCovered: shouldShow = ShowUncoveredInOverviewMargin; break; case CoverageType.Partial: shouldShow = ShowPartiallyCoveredInOverviewMargin; break; } return(shouldShow); }
private Color GetBackgroundColor(CoverageType coverageType) { Color backgroundColor = default(Color); switch (coverageType) { case CoverageType.Covered: backgroundColor = coverageColours.CoverageTouchedArea; break; case CoverageType.NotCovered: backgroundColor = coverageColours.CoverageNotTouchedArea; break; case CoverageType.Partial: backgroundColor = coverageColours.CoveragePartiallyTouchedArea; break; } return(backgroundColor); }
public override object ConvertBack(string fromVal) { if (fromVal == null) { throw new ArgumentNullException("fromVal"); } if (string.IsNullOrEmpty(fromVal)) { throw new ArgumentOutOfRangeException("fromVal", "Expected a non-empty string"); } string[] strArray = fromVal.Split(_splits, StringSplitOptions.RemoveEmptyEntries); if (strArray.Length <= 0) { throw new ArgumentOutOfRangeException("fromVal", "Unable to find elements of the CoverageType enum in '" + fromVal + "'"); } CoverageType type = (CoverageType)Enum.Parse(typeof(CoverageType), strArray[0]); for (int i = 1; i < strArray.Length; i++) { type |= (CoverageType)Enum.Parse(typeof(CoverageType), strArray[i].Trim()); } return(type); }
private int CoverageTypeToImageIndex(CoverageType type) { switch (type) { case CoverageType.Profile: return(0); case CoverageType.Module: return(1); case CoverageType.Namespace: return(2); case CoverageType.Class: return(3); case CoverageType.Method: return(4); default: return(-1); } }
//------------------------------------------------------------------------------------------------------------------------------------------ public async Task <ActualResult <IEnumerable <ResultSearchDTO> > > SearchHobby(CoverageType type, string hobby) { try { return(await Task.Run(() => { var idHobby = HashHelper.DecryptLong(hobby); switch (type) { case CoverageType.Employee: var searchByEmployeeHobby = _context.Employee .Include(p => p.PositionEmployees.IdSubdivisionNavigation.InverseIdSubordinateNavigation) .Include(p => p.HobbyEmployees) .Where(x => x.HobbyEmployees.AsQueryable().Any(t => t.IdHobby == idHobby)); return new ActualResult <IEnumerable <ResultSearchDTO> > { Result = ResultFormation(searchByEmployeeHobby) }; case CoverageType.Children: var searchByChildrenHobby = _context.Children .Include(p => p.HobbyChildrens) .Include(p => p.IdEmployeeNavigation.PositionEmployees.IdSubdivisionNavigation.InverseIdSubordinateNavigation) .Where(x => x.HobbyChildrens.AsQueryable().Any(t => t.IdHobby == idHobby)) .Select(x => x.IdEmployeeNavigation); return new ActualResult <IEnumerable <ResultSearchDTO> > { Result = ResultFormation(searchByChildrenHobby) }; case CoverageType.GrandChildren: var searchByGrandChildrenHobby = _context.GrandChildren .Include(p => p.HobbyGrandChildrens) .Include(p => p.IdEmployeeNavigation.PositionEmployees.IdSubdivisionNavigation.InverseIdSubordinateNavigation) .Where(x => x.HobbyGrandChildrens.AsQueryable().Any(t => t.IdHobby == idHobby)) .Select(x => x.IdEmployeeNavigation); return new ActualResult <IEnumerable <ResultSearchDTO> > { Result = ResultFormation(searchByGrandChildrenHobby) }; default: return new ActualResult <IEnumerable <ResultSearchDTO> >(); } })); } catch (Exception exception) { return(new ActualResult <IEnumerable <ResultSearchDTO> >(DescriptionExceptionHelper.GetDescriptionError(exception))); } }
/** * The Implementation of this method must return the number of cars that have coverages of the specified type on this Policy * @param coverageType * @return */ public abstract int getCoveredCarCount(CoverageType coverageType);
public static Invoice FromProgressNote(ProgressNote progressNote, string invoiceNumber, DateTime invoiceDate, DateTime dueDate, CoverageType coverageType, Payor payor = null) { //TODO: return(null); //return new Invoice() //{ // ClientId = progressNote.ClientId, // InvoiceItems = new InvoiceItem[] { }, // InvoiceNumber = invoiceNumber, // DueDate = dueDate, // InvoiceDate = invoiceDate, // Amount = progressNote.InvoiceItem.Amount, // CoverageType = coverageType, // Payor = payor, // PostingDate = invoiceDate, //}; }
public static bool ValueIncluded(this CoverageType c, CoverageType t) { return((c & t) == t); }
public double quote() { int baseMoney = 50; int agemoney = 0; int yearMoney = 0; int carmakemoney = 0; double total = 0; int age = DateTime.Now.Year - DateOfBirth.Year; if (age < 25 && age > 18) { agemoney += 25; } else if (age < 18) { agemoney += 100; } else if (age > 100) { agemoney += 25; } if (CarYear > 2015) { yearMoney += 25; } else if (CarYear < 2000) { yearMoney += 25; } if (CarMake == "Porsche") { carmakemoney += 25; if (CarModel == "911 carrera") { carmakemoney += 25; } } total = baseMoney + agemoney + carmakemoney + yearMoney; if (SpeedingTickets > 0) { total += 10 * SpeedingTickets; } if (DUI) { total += (total * 0.25); } if (CoverageType.ToLower() == "full") { total += (total * 0.5); } Total = Math.Round(total, 2); return(Total); }
public FarmProduct(string name, CoverageType coverageType) : this(null, name, coverageType) { }
public FarmProduct(string id, string name, CoverageType coverageType) : base(id, name) { CoverageType = coverageType; }
/// <summary> /// Creates a new instance of LocalGovernmentCoverageEntity. /// </summary> public LocalGovernmentCoverageEntity() { this.coverageField = CoverageType.unknown; }
/// <inheritdoc/> public string ToDelimitedString() { CultureInfo culture = CultureInfo.CurrentCulture; return(string.Format( culture, StringHelper.StringFormatSequence(0, 56, Configuration.FieldSeparator), Id, SetIdIn1.HasValue ? SetIdIn1.Value.ToString(culture) : null, HealthPlanId?.ToDelimitedString(), InsuranceCompanyId != null ? string.Join(Configuration.FieldRepeatSeparator, InsuranceCompanyId.Select(x => x.ToDelimitedString())) : null, InsuranceCompanyName != null ? string.Join(Configuration.FieldRepeatSeparator, InsuranceCompanyName.Select(x => x.ToDelimitedString())) : null, InsuranceCompanyAddress != null ? string.Join(Configuration.FieldRepeatSeparator, InsuranceCompanyAddress.Select(x => x.ToDelimitedString())) : null, InsuranceCoContactPerson != null ? string.Join(Configuration.FieldRepeatSeparator, InsuranceCoContactPerson.Select(x => x.ToDelimitedString())) : null, InsuranceCoPhoneNumber != null ? string.Join(Configuration.FieldRepeatSeparator, InsuranceCoPhoneNumber.Select(x => x.ToDelimitedString())) : null, GroupNumber, GroupName != null ? string.Join(Configuration.FieldRepeatSeparator, GroupName.Select(x => x.ToDelimitedString())) : null, InsuredsGroupEmpId != null ? string.Join(Configuration.FieldRepeatSeparator, InsuredsGroupEmpId.Select(x => x.ToDelimitedString())) : null, InsuredsGroupEmpName != null ? string.Join(Configuration.FieldRepeatSeparator, InsuredsGroupEmpName.Select(x => x.ToDelimitedString())) : null, PlanEffectiveDate.HasValue ? PlanEffectiveDate.Value.ToString(Consts.DateFormatPrecisionDay, culture) : null, PlanExpirationDate.HasValue ? PlanExpirationDate.Value.ToString(Consts.DateFormatPrecisionDay, culture) : null, AuthorizationInformation?.ToDelimitedString(), PlanType?.ToDelimitedString(), NameOfInsured != null ? string.Join(Configuration.FieldRepeatSeparator, NameOfInsured.Select(x => x.ToDelimitedString())) : null, InsuredsRelationshipToPatient?.ToDelimitedString(), InsuredsDateOfBirth.HasValue ? InsuredsDateOfBirth.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null, InsuredsAddress != null ? string.Join(Configuration.FieldRepeatSeparator, InsuredsAddress.Select(x => x.ToDelimitedString())) : null, AssignmentOfBenefits?.ToDelimitedString(), CoordinationOfBenefits?.ToDelimitedString(), CoordOfBenPriority, NoticeOfAdmissionFlag, NoticeOfAdmissionDate.HasValue ? NoticeOfAdmissionDate.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null, ReportOfEligibilityFlag, ReportOfEligibilityDate.HasValue ? ReportOfEligibilityDate.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null, ReleaseInformationCode?.ToDelimitedString(), PreAdmitCertPac, VerificationDateTime.HasValue ? VerificationDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null, VerificationBy != null ? string.Join(Configuration.FieldRepeatSeparator, VerificationBy.Select(x => x.ToDelimitedString())) : null, TypeOfAgreementCode?.ToDelimitedString(), BillingStatus?.ToDelimitedString(), LifetimeReserveDays.HasValue ? LifetimeReserveDays.Value.ToString(Consts.NumericFormat, culture) : null, DelayBeforeLRDay.HasValue ? DelayBeforeLRDay.Value.ToString(Consts.NumericFormat, culture) : null, CompanyPlanCode?.ToDelimitedString(), PolicyNumber, PolicyDeductible?.ToDelimitedString(), PolicyLimitAmount, PolicyLimitDays.HasValue ? PolicyLimitDays.Value.ToString(Consts.NumericFormat, culture) : null, RoomRateSemiPrivate, RoomRatePrivate, InsuredsEmploymentStatus?.ToDelimitedString(), InsuredsAdministrativeSex?.ToDelimitedString(), InsuredsEmployersAddress != null ? string.Join(Configuration.FieldRepeatSeparator, InsuredsEmployersAddress.Select(x => x.ToDelimitedString())) : null, VerificationStatus, PriorInsurancePlanId?.ToDelimitedString(), CoverageType?.ToDelimitedString(), Handicap?.ToDelimitedString(), InsuredsIdNumber != null ? string.Join(Configuration.FieldRepeatSeparator, InsuredsIdNumber.Select(x => x.ToDelimitedString())) : null, SignatureCode?.ToDelimitedString(), SignatureCodeDate.HasValue ? SignatureCodeDate.Value.ToString(Consts.DateFormatPrecisionDay, culture) : null, InsuredsBirthPlace, VipIndicator?.ToDelimitedString(), ExternalHealthPlanIdentifiers != null ? string.Join(Configuration.FieldRepeatSeparator, ExternalHealthPlanIdentifiers.Select(x => x.ToDelimitedString())) : null, InsuranceActionCode ).TrimEnd(Configuration.FieldSeparator.ToCharArray())); }
/// <summary> /// 计算当前点的覆盖类型 /// </summary> /// <param name="rscp">最佳接收功率</param> /// <param name="cir">CIR</param> /// <param name="interf">本系统干扰</param> /// <param name="otherInterf">异系统干扰</param> /// <param name="cirGate">干扰门限</param> /// <param name="type">覆盖类型</param> private void CalcCellCir(ValueMatrixShort rscp, ValueMatrixDouble cir,ValueMatrixDouble interf, float cirGate, CoverageType type) { if (rscp[m_Index] == rscp.InvalidValue) return; double tempCir = cir[m_Index]; double curCir = Commom.CalcCir(UnitTrans.ShortToDouble(rscp[m_Index]), interf[m_Index]); //if (curCir > tempCir && curCir > cirGate) if (curCir > cirGate) { cir[m_Index] = curCir; m_CovByCir[m_Index] = Commom.XorConvert(Convert.ToInt16(type), m_CovByCir[m_Index]); } }
//------------------------------------------------------------------------------------------------------------------------------------------ public async Task <ActualResult <IEnumerable <ResultSearchDTO> > > SearchBirthDate(CoverageType type, DateTime startDate, DateTime endDate) { try { return(await Task.Run(() => { switch (type) { case CoverageType.Employee: var searchByEmployeeBirthDate = _context.Employee .Include(p => p.PositionEmployees.IdSubdivisionNavigation.InverseIdSubordinateNavigation) .Where(x => x.BirthDate >= startDate && x.BirthDate <= endDate); return new ActualResult <IEnumerable <ResultSearchDTO> > { Result = ResultFormation(searchByEmployeeBirthDate) }; case CoverageType.Children: var searchByChildrenBirthDate = _context.Employee .Include(p => p.PositionEmployees.IdSubdivisionNavigation.InverseIdSubordinateNavigation) .Include(p => p.Children) .Where(x => x.Children.AsQueryable().Any(t => t.BirthDate >= startDate && t.BirthDate <= endDate)); return new ActualResult <IEnumerable <ResultSearchDTO> > { Result = ResultFormation(searchByChildrenBirthDate) }; case CoverageType.GrandChildren: var searchByGrandChildrenBirthDate = _context.Employee .Include(p => p.PositionEmployees.IdSubdivisionNavigation.InverseIdSubordinateNavigation) .Include(p => p.GrandChildren) .Where(x => x.GrandChildren.AsQueryable().Any(t => t.BirthDate >= startDate && t.BirthDate <= endDate)); return new ActualResult <IEnumerable <ResultSearchDTO> > { Result = ResultFormation(searchByGrandChildrenBirthDate) }; default: return new ActualResult <IEnumerable <ResultSearchDTO> >(); } })); } catch (Exception exception) { return(new ActualResult <IEnumerable <ResultSearchDTO> >(DescriptionExceptionHelper.GetDescriptionError(exception))); } }
public void AddCoverageType(CoverageType coverageType) { throw new NotImplementedException(); }
//construct(){} //No default constructor. We must only contruct coverages of the correct type public Coverage(CoverageType covType) { _covType = covType; }
private void CalcUMTSCellCir(ValueMatrixDouble umtsBestServerID, ValueMatrixShort rscp, ValueMatrixDouble cir, ValueMatrixDouble interfMatrix, float cirGate, CoverageType type) { if (rscp[m_Index] == rscp.InvalidValue || umtsBestServerID[m_Index] == umtsBestServerID.DefaultValue) return; UMTSCell bestCell = (UMTSCell)SearchAssist.GetCellbyID(Convert.ToInt16(umtsBestServerID[m_Index]), m_CellList); ClutterParamsResult clutterparam = COPredicCommonCalc.ConfingClutter(bestCell.Parent, m_appContext); float modelShadowMargin = COPredicCommonCalc.GetModelShadowMargin(clutterparam, m_Group.CoCovUIParam.Shadow, m_Group.CoCovUIParam.CoverageProb); float ciShadowMargin = COPredicCommonCalc.GetCIShadowMargin(clutterparam, m_Group.CoCovUIParam.Shadow, m_Group.CoCovUIParam.CoverageProb); double interf = CalcUMTSBinInterf(rscp, bestCell, modelShadowMargin, interfMatrix); double tempCir = cir[m_Index]; double curCir = Commom.CalcCir(UnitTrans.ShortToDouble(rscp[m_Index]), interf) + modelShadowMargin - ciShadowMargin; //if (curCir > tempCir && curCir > cirGate) if (curCir > cirGate) { cir[m_Index] = curCir; m_CovByCir[m_Index] = Commom.XorConvert(Convert.ToInt16(type), m_CovByCir[m_Index]); } }
public CoveragePricedType() { this._deductible = new DeductibleType(); this._charge = new VehicleChargeType(); this._coverage = new CoverageType(); }
public IEnumerable <CoverageType> Get(CoverageType entity) { return(_unitOfWork.CoverageType.Get(entity)); }