添加設置計劃作業,我需要補充的是可以用來改變Episerver計劃作業的行爲的複選框:如何Episerver
public class ImportAlarms : ScheduledJobBase
{
/*I want the editor to set this*/
public bool CheckBox { get; set; }
public override string Execute()
{
OnStatusChanged("Starting execution of import alarms");
var status = Import();
return status;
}
private static string Import()
{
/*Do something with CheckBox value here*/
var repository = ServiceLocator.Current.GetInstance<IContentRepository>();
var alarms = ImportAlarmsProvider.Import(DateTime.Now.AddDays(-1), DateTime.Now.AddDays(1));
var createdCount = new AlarmRepository(repository).ImportAlarms(alarms.OrderBy(x => x.Date));
return createdCount == -1 ? "No alarm container page set" : string.Format("Import completed, {0} pages imported", createdCount);
}
}
我想多一個複選框,如活動複選框,默認情況下。
謝謝,這是一個尋找。太糟糕了,它實施這樣的喧囂:P – Dujskan