/// <summary> /// Carga el Program para la invitacion /// </summary> /// <param name="module">EnumModule</param> /// <param name="invitationType">EnumInvitationType</param> /// <param name="guId">GuestID</param> /// <history> /// [erosado] 10/08/2016 Created. /// </history> private async Task LoadProgram(EnumModule module, EnumInvitationType invitationType, int guId) { EnumProgram program = EnumProgram.All; //Si se tiene el GuestID if (guId != 0 && module != EnumModule.Host) { //Obtenemos la informacion del Guest var guest = await BRGuests.GetGuest(guId); //Obtenemos la informacion de program var result = await BRLeadSources.GetLeadSourceProgram(guest.gulsOriginal); //Asignamos el Program if (result == EnumToListHelper.GetEnumDescription(EnumProgram.Inhouse)) { program = EnumProgram.Inhouse; } else { program = EnumProgram.Outhouse; } } //Si NO hay un Guest para obtener el program else { //De que modulo me estan hablando switch (module) { case EnumModule.InHouse: if (invitationType == EnumInvitationType.newExternal) { program = EnumProgram.Inhouse; } break; case EnumModule.OutHouse: if (invitationType == EnumInvitationType.newOutHouse) { program = EnumProgram.Outhouse; } break; case EnumModule.Host: if (invitationType == EnumInvitationType.newOutHouse) { program = EnumProgram.Outhouse; } else { program = EnumProgram.Inhouse; } break; } } Program = program; AllowReschedule = program == EnumProgram.Inhouse; }