public override void DeleteScriptSchedule(int customerID, Guid scriptScheduleID)
        {
            CallButler.Data.CallButlerDataset.ScriptSchedulesRow scriptSchedule = data.ScriptSchedules.FindByScriptScheduleID(scriptScheduleID);

            if (scriptSchedule != null)
            {
                scriptSchedule.Delete();
                SaveChanges();
            }
        }
        public override bool PersistScriptSchedule(int customerID, CallButlerDataset.ScriptSchedulesRow scriptSchedule)
        {
            bool added = false;

            CallButler.Data.CallButlerDataset.ScriptSchedulesRow existingRow = data.ScriptSchedules.FindByScriptScheduleID(scriptSchedule.ScriptScheduleID);

            // If the row doesn't exist, add it. Otherwise edit it
            if (existingRow == null)
            {
                // Add a new row
                data.ScriptSchedules.ImportRow(scriptSchedule);
                added = true;
            }
            else
            {
                // Update the row
                UpdateRowChanges(existingRow, scriptSchedule);
            }

            SaveChanges();

            return(added);
        }
Пример #3
0
 public abstract bool PersistScriptSchedule(int customerID, CallButler.Data.CallButlerDataset.ScriptSchedulesRow scriptSchedule);