public static void getdata(SystemProcessThreadModel obj) { ControlPanel.Core.Entities.SystemProcessThread SystemProcessThreadEntity = new ControlPanel.Core.Entities.SystemProcessThread(); var continuouschk = obj.Continuous; var isnewsysprocess = obj.SystemProcessId; if (isnewsysprocess == "-1") { var sysId = addsystemprocess(obj); SystemProcessThreadEntity.SystemProcessId = sysId; } else { SystemProcessThreadEntity.SystemProcessId = Convert.ToInt16(obj.SystemProcessId); } TimeSpan scheduleTime; SystemProcessThreadEntity.Name = obj.Name; SystemProcessThreadEntity.Description = obj.Description; SystemProcessThreadEntity.SpringEntryName = obj.SpringEntryName; TimeSpan.TryParse(obj.ScheduledTime, out scheduleTime); SystemProcessThreadEntity.ScheduledTime = scheduleTime; SystemProcessThreadEntity.Enabled = false; if (continuouschk == "on") { SystemProcessThreadEntity.Continuous = true; } else { SystemProcessThreadEntity.Continuous = false; } SystemProcessThreadEntity.SleepTime = 10; SystemProcessThreadEntity.AutoStart = false; SystemProcessThreadEntity.ContinuousDelay = Convert.ToInt16(obj.ContinuousDelay); SystemProcessThreadEntity.IsDeleted = false; SystemProcessThreadEntity.DisplayOrder = "0"; SystemProcessThreadEntity.Argument = obj.Argument; ControlPanel.Repository.SystemProcessThreadRepository sptrepo = new ControlPanel.Repository.SystemProcessThreadRepository(); var threadId = obj.HiddenField; if (threadId == null) { sptrepo.InsertSystemProcessThread(SystemProcessThreadEntity); } else { SystemProcessThreadEntity.SystemProcessThreadId = Convert.ToInt16(threadId); sptrepo.UpdateSystemProcessThread(SystemProcessThreadEntity); } }
public static void getdata(SystemProcessThreadModel obj) { ControlPanel.Core.Entities.SystemProcessThread SystemProcessThreadEntity = new ControlPanel.Core.Entities.SystemProcessThread(); var continuouschk = obj.Continuous; var isnewsysprocess = obj.SystemProcessId; if (isnewsysprocess == "-1") { var sysId = addsystemprocess(obj); SystemProcessThreadEntity.SystemProcessId = sysId; } else { SystemProcessThreadEntity.SystemProcessId = Convert.ToInt16(obj.SystemProcessId); } TimeSpan scheduleTime; SystemProcessThreadEntity.Name = obj.Name; SystemProcessThreadEntity.Description = obj.Description; SystemProcessThreadEntity.SpringEntryName = obj.SpringEntryName; TimeSpan.TryParse(obj.ScheduledTime, out scheduleTime); SystemProcessThreadEntity.ScheduledTime = scheduleTime; SystemProcessThreadEntity.Enabled = false; if (continuouschk == "on") SystemProcessThreadEntity.Continuous = true; else SystemProcessThreadEntity.Continuous = false; SystemProcessThreadEntity.SleepTime = 10; SystemProcessThreadEntity.AutoStart = false; SystemProcessThreadEntity.ContinuousDelay = Convert.ToInt16(obj.ContinuousDelay); SystemProcessThreadEntity.IsDeleted = false; SystemProcessThreadEntity.DisplayOrder = "0"; SystemProcessThreadEntity.Argument = obj.Argument; ControlPanel.Repository.SystemProcessThreadRepository sptrepo = new ControlPanel.Repository.SystemProcessThreadRepository(); var threadId = obj.HiddenField; if (threadId == null) { sptrepo.InsertSystemProcessThread(SystemProcessThreadEntity); } else { SystemProcessThreadEntity.SystemProcessThreadId = Convert.ToInt16(threadId); sptrepo.UpdateSystemProcessThread(SystemProcessThreadEntity); } }