Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private List<string> GetEmails()
- {
- List<string> emails=new List<string>();
- var sd = GetPropertiesSection();
- if (sd == null)
- {
- _formResult = _formResult + Environment.NewLine + "propertiesSection==null";
- return emails;
- }
- RowData rd = sd.FindRow("@Name='" + DistributionListPropertyName + "'");
- if (rd == null)
- {
- _formResult = _formResult + Environment.NewLine + "rowData"+DistributionListPropertyName+"==null";
- return emails;
- }
- var sdSelectedValues = rd.ChildSections[SelectedValuesSectionId].GetAllRows();
- if (!sdSelectedValues.Any())
- {
- _formResult = _formResult + Environment.NewLine + "sdSelectedValues==empty";
- return emails;
- }
- foreach (var row in sdSelectedValues)
- {
- var empObj = row.GetObject("SelectedValue");
- var empId = ConvertStringToGuid(empObj.ToString());
- var employee = empId != Guid.Empty ? ContextHelper.LocalContext.GetObject<StaffEmployee>(empId) : null;
- if(employee==null) continue;
- if(!string.IsNullOrEmpty(employee.Email))
- emails.Add(employee.Email);
- }
- return emails;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement