Exemplo n.º 1
0
 protected NewCell ToCell(FormControlViewModel control)
 {
     return(new NewCell
     {
         ColumnId = control.Id,
         ColumnType = control.Type,
         Value = control.Value
     });
 }
Exemplo n.º 2
0
 protected EditCell ToEditCell(FormControlViewModel control)
 {
     return(new EditCell
     {
         CellId = control.Id,
         ColumnId = control.AditionalId,
         Value = control.Value
     });
 }
Exemplo n.º 3
0
        public FormControlViewModel NewAddedSlideHtml()
        {
            FormControlViewModel formControlViewModel = new FormControlViewModel();
            Page         page    = new Page();
            Control      control = (Control)LoadControl("~/Orgsys_Forms/Slides/Slide.ascx");
            StringWriter sw      = new StringWriter();

            page.Controls.Add(control);
            Server.Execute(page, sw, false);
            var controlString = sw.ToString();

            StringBuilder stringBuilder = new StringBuilder(controlString);
            string        id            = Guid.NewGuid().ToString();

            stringBuilder.Replace("@@ControlId", "Slide_" + id);
            stringBuilder.Replace("@@EditorId", "Editor_" + id);
            formControlViewModel.htmlString = stringBuilder.ToString();
            formControlViewModel.controlId  = id;

            return(formControlViewModel);
        }