Exemplo n.º 1
0
partial         void OnTemplate(AdministrationSimpleEditTemplate template, ControllerContext controllerContext);
Exemplo n.º 2
0
 private ActionResult Render(Models.User model)
 {
     var template = new AdministrationSimpleEditTemplate(model)
     {
         Fields = new[]
         {
             new Field
             {
                 Width = 6,
                 Label = "�û���",
                 FieldName = "UserName",
                 Control = new TextBox()
                 {
                     MaxLength = 12,
                     Value = model.UserName
                 }
             },
             new Field
             {
                 Width = 6,
                 Label = "�Ա�",
                 FieldName = "Gender",
                 Control = new SelectList()
                 {
                     Items = new[]
                     {
                         new SelectListItem
                         {
                             Text = "��",
                             Value = Gender.Male.ToString(),
                             Selected = true,
                         },
                         new SelectListItem
                         {
                             Text = "Ů",
                             Value = Gender.Female.ToString(),
                             Selected = false,
                         }
                     }
                 }
             }
         },
         Buttons = new IClickable[]
         {
             new Button()
             {
                 Text = "����",
                 ActionName = "",
             }
         }
     };
     return Template(template);
 }
Exemplo n.º 3
0
 public Template CreateTemplate(ControllerContext controllerContext)
 {
     var template = new AdministrationSimpleEditTemplate
     {
         Title = Moonlit.Mvc.Maintenance.Properties.MaintCultureTextResources.SystemJobEdit,
         Description = Moonlit.Mvc.Maintenance.Properties.MaintCultureTextResources.SystemJobEditDescription,
         FormTitle = Moonlit.Mvc.Maintenance.Properties.MaintCultureTextResources.SystemJobInfo,
         Fields = new FieldsBuilder().ForEntity(this, controllerContext).Build(),
     };
     OnTemplate(template, controllerContext);
     return template;
 }