public FieldOptionValueController()
 {
     DB         = new FieldOptionModelContext <FieldOptionValueModel>();
     CanDelete  = true;
     ForeignKey = "FieldOptionId";
     Form       = new FieldOptionValueForm();
     ReturnTo   = new ReturnTo(new FieldOptionController(), "Edit", "FieldOptionId", "Name", new string[] { "Create", "Edit", "Delete" });
 }
示例#2
0
        public ReportForm()
        {
            FormTitle = "Report";
            Fields.Add(new IdField()
            {
                Name = "Id"
            });
            Fields.Add(new CharField()
            {
                Name = "Name"
            });
            Fields.Add(new CharField()
            {
                Name = "SSRSReportName", Label = "SSRS Report Name", HelpText = "File name of the report in the SSRS server. Example: Report.rdl."
            });
            Fields.Add(new CharField()
            {
                Name = "Category", Label = "Category/Area", Options = FieldOptionModelContext.GetByRegistration("ReportModel.Category")
            });
            Fields.Add(new CharMaxField()
            {
                Name = "Description"
            });
            Fields.Add(new CharField()
            {
                Name = "Permit", Options = ReportModel.Permits, ClassNames = "col-sm-6"
            });
            Fields.Add(new BooleanField()
            {
                Name = "IsActive", ClassNames = "col-sm-6"
            });

            Fields.Add(new GroupLabel()
            {
                Label = "Run file name"
            });
            Fields.Add(new CharField()
            {
                Name = "FileName", ClassNames = "col-sm-9", HelpText = "To append date and/or time to end of file use {date} or {datetime}. Example: file-{date}"
            });
            Fields.Add(new CharField()
            {
                Name = "Format", ClassNames = "col-sm-3", Options = ReportModel.Formats
            });
            Fields.Add(new HiddenField()
            {
                Name = "ScheduledMonth", Label = "Months", HelpText = "Comma separated values of months from 0-11."
            });
            Fields.Add(new HiddenField()
            {
                Name = "ScheduledWeek", Label = "Weeks", HelpText = "Comma separated values of weeks in a month from 0-4."
            });
            Fields.Add(new HiddenField()
            {
                Name = "ScheduledDays", Label = "Days", HelpText = "Comma separated values of days in a week from 0-7."
            });
            Fields.Add(new HiddenField()
            {
                Name = "ScheduledTime", Label = "Time", HelpText = "The time of the day when it should run."
            });
            Fields.Add(new HiddenField()
            {
                Name = "LastRan"
            });
        }