/// <summary> /// Carga los catalogos de los combos /// </summary> /// <history> /// [vku] 22/Jun/2016 Created /// </history> protected async void LoadCatalogs() { try { List <TourTimesSchema> lstTourTimesSchemas = await BRTourTimesSchemas.GetTourTimesSchemas(nStatus : 1); List <LeadSourceByUser> lstLeadSourceByUser = await BRLeadSources.GetLeadSourcesByUser((Context.User.User.peID)); List <SalesRoomByUser> lstSalesRoomByUser = await BRSalesRooms.GetSalesRoomsByUser((Context.User.User.peID)); List <WeekDay> lstWeekDays = await BRWeekDays.GetWeekDays("EN"); int tourTimesSchema = await BRConfiguration.GetTourTimesSchema(); cboSchema.SelectedValue = tourTimesSchema; cboSchema.ItemsSource = lstTourTimesSchemas; cboLeadSource.ItemsSource = lstLeadSourceByUser; cboSalesRoom.ItemsSource = lstSalesRoomByUser; cboWeekDay.ItemsSource = lstWeekDays; cboLeadSourceTo.ItemsSource = lstLeadSourceByUser; cboSalesRoomTo.ItemsSource = lstSalesRoomByUser; EnableCopy(); LoadListTourTimes(); } catch (Exception ex) { UIHelper.ShowMessage(ex); } }
/// <summary> /// Carga los esquemas de horarios de tour /// </summary> /// <history> /// [vku] 13/Jun/2016 Created /// </history> protected async void LoadTourTimesSchema() { try { List <TourTimesSchema> lstTourTimesSchemas = await BRTourTimesSchemas.GetTourTimesSchemas(nStatus : 1); cboocTourTimesSchema.ItemsSource = lstTourTimesSchemas; } catch (Exception ex) { UIHelper.ShowMessage(ex); } }
/// <summary> /// Llena el grid de Schemas /// </summary> /// <param name="tourTimeSchema">Objeto a seleccionar</param> /// <history> /// [emoguel] created 28/04/2016 /// </history> private async void LoadSchemas(TourTimesSchema tourTimeSchema = null) { try { status.Visibility = Visibility.Visible; List <TourTimesSchema> lstTourTimesSchemas = await BRTourTimesSchemas.GetTourTimesSchemas(_nStatus, _tourTimeSchemaFilter); dgrTourTimesSchemas.ItemsSource = lstTourTimesSchemas; int nIndex = 0; if (lstTourTimesSchemas.Count > 0 && tourTimeSchema != null) { tourTimeSchema = lstTourTimesSchemas.Where(tc => tc.tcID == tourTimeSchema.tcID).FirstOrDefault(); nIndex = lstTourTimesSchemas.IndexOf(tourTimeSchema); } GridHelper.SelectRow(dgrTourTimesSchemas, nIndex); StatusBarReg.Content = lstTourTimesSchemas.Count + " Schemas."; status.Visibility = Visibility.Collapsed; } catch (Exception ex) { UIHelper.ShowMessage(ex); } }