/// <summary> /// Carga el formulario /// </summary> /// <history> /// [aalcocer] 09/03/2016 Created /// [aalcocer] 06/04/2016 Modified. La lista de combo de idiomas trae solo los activos /// </history> private async void frmMailOuts_ContentRendered(object sender, EventArgs e) { //armamos la lista del combo de idiomas StaStart("Loading languages..."); _ltsLanguages = await BRLanguages.GetLanguages(nStatus : 1); _languageViewSource.Source = _ltsLanguages; //cargamos los mail outs StaStart("Loading mail outs..."); _ltsMailOutTexts = await BRMailOutTexts.GetMailOutTexts(Context.User.LeadSource.lsID, status : 1); _mailOutTextViewSource.Source = _ltsMailOutTexts.Where(x => x.mtla == "EN"); // procesamos los huespedes para asignarle automaticamente un mail out en base a los criterios definidos BRMailOuts.ProcessMailOuts(Context.User.LeadSource.lsID); //cargamos los huespedes LoadGrid(); StaEnd(); }
/// <summary> /// Obtiene la lista de MailOutText por LeadSourceID y LanguageID /// </summary> /// <param name="ls">LeadSourceID</param> /// <param name="la">LanguageID</param> /// <history> /// [erosado] 07/04/2016 Created /// </history> public async void DoGetMailOutText(string ls, string la) { try { if (!string.IsNullOrEmpty(ls) && !string.IsNullOrEmpty(la)) { var data = await BRMailOutTexts.GetMailOutTexts(ls, la, 1); if (data.Count > 0) { lsbxMailOuts.ItemsSource = data; txtbMailOutsNumber.Text = data.Count.ToString(); lsbxMailOuts.SelectedIndex = 0; } } StaEnd(); } catch (System.Data.DataException ex) { StaEnd(); UIHelper.ShowMessage(ex); } }