本文整理汇总了C#中Types.Get方法的典型用法代码示例。如果您正苦于以下问题:C# Types.Get方法的具体用法?C# Types.Get怎么用?C# Types.Get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Types
的用法示例。
在下文中一共展示了Types.Get方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetBy
public Hospital GetBy(short id)
{
Assertion.GreaterThan((int)id, 0, "Nenhum hospital informado.").Validate();
var hospitals = new Types<Hospital>();
var hostpital = hospitals.Get(id);
Assertion.NotNull(hostpital, "Nenhum hospital encontrado, que corresponde a lista informada.").Validate();
return hostpital;
}
示例2: AddHemotransfusions
private void AddHemotransfusions(Legacy.Summary legacySummary, Summary newSummary)
{
var hemotransfusionTypesRepository = new Types<HemotransfusionType>();
foreach (var legacyHemotransfusion in legacySummary.Hemotransfusions)
{
if (legacyHemotransfusion != null)
{
short hemotransfusionTypeId = Convert.ToInt16(legacyHemotransfusion.HemotransfusionTypeId);
HemotransfusionType hemotransfusionType = hemotransfusionTypesRepository.Get(hemotransfusionTypeId);
//newSummary.CreateHemotransfusion(hemotransfusionType);
}
}
}
示例3: AddDiagnostics
private void AddDiagnostics(Legacy.Summary legacySummary, Summary newSummary)
{
var diagnosticTypesRepository = new Types<DiagnosticType>();
foreach (var legacyDiagnostic in legacySummary.Diagnostics)
{
if (legacyDiagnostic != null && !String.IsNullOrWhiteSpace(legacyDiagnostic.Type))
{
short diagnosticTypeId = Convert.ToInt16(legacyDiagnostic.Type);
DiagnosticType diagnosticType = diagnosticTypesRepository.Get(diagnosticTypeId);
CID cid = new CID { Code = legacyDiagnostic.Cid };
newSummary.CreateDiagnostic(diagnosticType, cid);
}
}
}
示例4: AddprofessionalResgistration
public override void AddprofessionalResgistration(int accountId, short professionalResgistrationType, string professionalResgistrationNumber, short stateId)
{
//todo: Implementando
var account = _accounts.Get<Account>(accountId);
Assertion.IsTrue(account.ProfessionalRegistrations == null ||
account.ProfessionalRegistrations.Count == 0 ||
!account.ProfessionalRegistrations.Any(p => p.State.Id == stateId && p.Type == (ProfessionalRegistrationTypeEnum)professionalResgistrationType),
"Este estado já foi registrado").Validate();
//((Accounts)FactoryRepository.GetRepository(RepositoryEnum.Accounts)).Approve(account);
var repository = new Types<State>();
var state = repository.Get(stateId);
var professionalRegistration = new ProfessionalRegistration
{
Number = professionalResgistrationNumber,
Type = (ProfessionalRegistrationTypeEnum)professionalResgistrationType,
State = state
};
account.AddProfessionalRegistration(professionalRegistration);
FactoryRepository.GetRepository(RepositoryEnum.Accounts).Save(account);
}
示例5: SaveReasonOfAdmission
public override void SaveReasonOfAdmission(int idSummary, IList<short> reasonsOfAdmission)
{
var summary = Summaries.Get<Summary>(idSummary);
var repository = new Types<ReasonOfAdmission>();
summary.ReasonOfAdmission.Clear();
foreach (short reason in reasonsOfAdmission)
{
summary.ReasonOfAdmission.Add(repository.Get(reason));
}
Summaries.Save(summary);
}
示例6: GetAllNotApproved
public override IList<Account> GetAllNotApproved(short hospitalId)
{
var hospitals = new Types<Hospital>();
var hospital = hospitals.Get(hospitalId);
var accountList = _accounts.GetAllNotApproved(hospital);
#region Poscondition
Assertion.NotNull(accountList, "A lista retornada está nula.").Validate();
#endregion
return accountList;
}
示例7: insert_hospitals
public void insert_hospitals()
{
var state = new Types<State>();
var hospitalList = new List<Hospital>
{
//new Hospital{Name = "Assunção", Description = "Hospital e Maternidade", URLImage = "../../Images/Hospitals/assuncao.png", State = state.Get(25),Key = "Assuncao"},
//new Hospital{Name = "Badim", Description = "Hospital", URLImage = "../../Images/Hospitals/badim.png", State = state.Get(19),Key = "Badim"},
new Hospital{Name = "Bangu", Description = "Hospital", URLImage = "../../Images/Hospitals/bangu.png", State = state.Get(19),Key = "Bangu", Database = new Database{Description = "Homologacao",Host = "10.250.10.218", Service = "HMBANGU", User = "SUMARIO_ALTA", Password = "sumario_alta"}},
//new Hospital{Name = "Barra D'Or", Description = "Hospital", URLImage = "../../Images/Hospitals/barrador.png", State = state.Get(19),Key = "BarraDor"},
//new Hospital{Name = "Brasil", Description = "Hospital e Maternidade", URLImage = "../../Images/Hospitals/brasil.png", State = state.Get(25),Key = "Brasil"},
//new Hospital{Name = "Copa D'Or", Description = "Hospital", URLImage = "../../Images/Hospitals/copador.png", State = state.Get(19),Key = "CopaDor"},
new Hospital{Name = "Esperança", Description = "Hospital", URLImage = "../../Images/Hospitals/esperanca.png", State = state.Get(17),Key = "Esperanca", Database = new Database{Description = "Homologacao",Host = "10.250.3.45", Service = "HMLESP", User = "SUMARIO_ALTA", Password = "sumario_alta"}},
//new Hospital{Name = "Israelita Albert Sabim", Description = "Hospital", URLImage = "../../Images/Hospitals/israelitaalbertsabim.png", State = state.Get(19),Key = "IsraelitaAlbertSabim"},
//new Hospital{Name = "Joari", Description = "Hospital", URLImage = "../../Images/Hospitals/joari.png", State = state.Get(19),Key = "Joari"},
//new Hospital{Name = "Niterói D'Or", Description = "Hospital", URLImage = "../../Images/Hospitals/niteroidor.png", State = state.Get(19),Key = "NiteroiDOr"},
new Hospital{Name = "Norte D'Or", Description = "Hospital", URLImage = "../../Images/Hospitals/nortedor.png", State = state.Get(19),Key = "Norte", Database = new Database{Description = "Homologacao",Host = "10.250.3.45", Service = "HMNORTE", User = "SUMARIO_ALTA", Password = "sumario_alta"}},
//new Hospital{Name = "Prontolinda", Description = "Hospital", URLImage = "../../Images/Hospitals/prontolinda.png", State = state.Get(17),Key = "Pronto"},
new Hospital{Name = "Quinta D'Or", Description = "Hospital", URLImage = "../../Images/Hospitals/quintador.png", State = state.Get(19),Key = "QuintaDor", Database = new Database{Description = "Homologacao",Host = "10.250.3.45", Service = "HMQUINTA", User = "admwpd", Password = "admwpd"}},
//new Hospital{Name = "Rede D'Or São Luiz", Description = "Hospital", URLImage = "../../Images/Hospitals/saoluiz.png", State = state.Get(25),Key = "RedeDOrSaoLuiz"},
//new Hospital{Name = "Rio de Janeiro", Description = "Hospital", URLImage = "../../Images/Hospitals/riodejaneiro.png", State = state.Get(19),Key = "RioDeJaneiro"},
new Hospital{Name = "Rios D'Or", Description = "Hospital", URLImage = "../../Images/Hospitals/riosdor.png", State = state.Get(19),Key = "RiosDor", Database = new Database{Description = "Homologacao",Host = "10.250.3.45", Service = "HMRIOS", User = "SUMARIO_ALTA", Password = "sumario_alta"}},
//new Hospital{Name = "São Marcos", Description = "Hospital", URLImage = "../../Images/Hospitals/saomarcos.png", State = state.Get(17),Key = "SaoMarcos"}
};
var repository = new Hospitals();
repository.Save(hospitalList);
}