本文整理匯總了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();
}