本文整理汇总了C#中BaseService.GetById方法的典型用法代码示例。如果您正苦于以下问题:C# BaseService.GetById方法的具体用法?C# BaseService.GetById怎么用?C# BaseService.GetById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseService
的用法示例。
在下文中一共展示了BaseService.GetById方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: StartTaskScheduler
public static void StartTaskScheduler(Guid id)
{
if (scheduler != null)
{
scheduler.Stop();
scheduler = null;
}
scheduler = new JobScheduler();
scheduler.TimerInterval = 60000;//30 phút
string status = string.Empty;
JobItem task = new JobItem();
var service = new BaseService();
var lstObj = new List<object>();
List<Sys_AutoBackup> listAutoBackup = new List<Sys_AutoBackup>();
var lstAutoBackup = service.GetById<Sys_AutoBackup>(id, ref status);
listAutoBackup.Add(lstAutoBackup);
foreach (var autoBackup in listAutoBackup)
{
scheduler.TaskItems.Add(new JobItem
{
Interval = autoBackup.TimeWaiting == null ? 0 : autoBackup.TimeWaiting.Value,
DateExpired = autoBackup.DateExpired,
DateStart = autoBackup.DateStart.Value,
Description = autoBackup.Description,
IsActivate = autoBackup.IsActivate == null ? false : autoBackup.IsActivate.Value,
LastStart = autoBackup.LastStart,
JobArgs = autoBackup.AutoBackupName
+ "|" + autoBackup.ProcedureName
+ "|" + autoBackup.Email,
JobType = autoBackup.AutoBackupName,
JobItemType = typeof(Task_AutoBackup),
Type = (SchedulerType)Enum.Parse(typeof(SchedulerType), autoBackup.Type.ToString()),
});
}
scheduler.Start();
}