public ActionResult MtsEmployee() { var model = new MtsEmployeeFormVM(); var dates = MtsEmployeeFormVM.CourseTCList.ToDictionary(x => x, x => GroupService.GetGroupsForCourse(x).Select(y => y.DateInterval + " " + StringUtils.AngleBrackets(y.Complex.Name) + " " + y.Complex.Address).Distinct() .Select(z => new { id = z, name = z }.As <object>()).ToList()); model.Courses = CourseService.GetCourseLinkList(MtsEmployeeFormVM.CourseTCList, false).ToList(); model.Dates = dates; return(BaseView(Views.Center.MtsEmployeeForm, model)); }
public ActionResult MtsEmployeePost(MtsEmployeeFormVM model) { var data = SimpleUtils.FluentAttributes.Utils.EntityUtils.ToStrings(model, x => x.FullName, x => x.Organization, x => x.Email, x => x.Phone, x => x.Number, x => x.Course, x => x.Date ); var message = DictionaryUtils.ToHtml(data); MailService.SendSeminarRegistration(message); MailService.Send(Services.Common.MailService.info, Services.Common.MailService.secrko, message, "Сотрудник МТС", Services.Common.MailService.akavinkina); return(Content("ok")); }