public static void AddCommand(int rschId, string command, string commandParams = "", int startTime = 60) { var db = new SandBoxDataContext(); try { if ((command != null && command != String.Empty)) { Commands newCommand = new Commands() { RschId = rschId, Command = command, CommandParams = commandParams, CommandStartTime = startTime }; db.Commands.InsertOnSubmit(newCommand); db.SubmitChanges(); } } catch (Exception e) { //УБРАТЬ СЛЕПОЙ CATCH!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! } }
partial void UpdateCommands(Commands instance);
partial void DeleteCommands(Commands instance);
partial void InsertCommands(Commands instance);