Ejemplo n.º 1
0
 public void DeleteUploaditem(string SiteName, string Localpath, string Filenamewithoutpath)
 {
     strSQL = "DELETE FROM UploadBreakpoint WHERE SiteName=@SiteName AND LocalPath=@Localpath AND FileNameWithoutPath=@Filenamewithoutpath";
     Sqlite.ExecuteNonQuery(strSQL, new SQLiteParameter[] { new SQLiteParameter("@SiteName", SiteName),
                                                            new SQLiteParameter("@Localpath", Localpath),
                                                            new SQLiteParameter("@Filenamewithoutpath", Filenamewithoutpath) });
 }
Ejemplo n.º 2
0
        public bool DeleteSchedule(string SchName)
        {
            try
            {
                strSQL = "DELETE FROM Schedule_RunStep WHERE ScheduleName=@SchName";
                Sqlite.ExecuteNonQuery(strSQL,
                                       new SQLiteParameter[] { new SQLiteParameter("@SchName", SchName) });
            }
            catch
            {
                return(false);
            }
            /////////////////////////////////////////////////////////////////////////////////
            try
            {
                strSQL = "DELETE FROM Schedule_BaseData WHERE ScheduleName=@SchName";
                Sqlite.ExecuteNonQuery(strSQL,
                                       new SQLiteParameter[] { new SQLiteParameter("@SchName", SchName) });
            }
            catch
            {
                return(false);
            }

            return(true);
        }
Ejemplo n.º 3
0
 public void UpdateScheduleStatus(string SchName, string Status)
 {
     strSQL = "UPDATE Schedule_BaseData SET Status=@Status WHERE ScheduleName=@SchName";
     Sqlite.ExecuteNonQuery(strSQL,
                            new SQLiteParameter[] { new SQLiteParameter("@Status", Status),
                                                    new SQLiteParameter("@SchName", SchName) });
 }
Ejemplo n.º 4
0
 public void MoveDataToSiteProfile()
 {
     strSQL = "DELETE FROM SiteProfile";
     Sqlite.ExecuteNonQuery(strSQL, null);
     strSQL = "INSERT INTO SiteProfile SELECT * FROM SiteProfile_ForRestore";
     Sqlite.ExecuteNonQuery(strSQL, null);
 }
Ejemplo n.º 5
0
 public void MoveDataToAction()
 {
     strSQL = "DELETE FROM ActionType";
     Sqlite.ExecuteNonQuery(strSQL, null);
     strSQL = "INSERT INTO ActionType SELECT * FROM ActionType_ForRestore";
     Sqlite.ExecuteNonQuery(strSQL, null);
 }
Ejemplo n.º 6
0
 public void DeleteScheduleRestoreTable()
 {
     strSQL = "DELETE FROM Schedule_BaseData_ForRestore";
     Sqlite.ExecuteNonQuery(strSQL, null);
     strSQL = "DELETE FROM Schedule_RunStep_ForRestore";
     Sqlite.ExecuteNonQuery(strSQL, null);
 }
Ejemplo n.º 7
0
 public void SaveMailSetting(string MailFrom, string SMTP, string Account, string Password)
 {
     strSQL = "DELETE FROM Mail";
     Sqlite.ExecuteNonQuery(strSQL, null);
     strSQL = "INSERT INTO Mail(MailFrom,SMTP,Account,Password) VALUES (@MailFrom,@SMTP,@Account,@Password)";
     Sqlite.ExecuteNonQuery(strSQL, new SQLiteParameter[] { new SQLiteParameter("@MailFrom", MailFrom),
                                                            new SQLiteParameter("@SMTP", SMTP),
                                                            new SQLiteParameter("@Account", MailFrom),
                                                            new SQLiteParameter("@Password", Password) });
 }
Ejemplo n.º 8
0
 public void UpdateActionName(string OldAction, string NewAction)
 {
     strSQL = "UPDATE ActionType SET Action=@NewAction WHERE Action=@OldAction";
     Sqlite.ExecuteNonQuery(strSQL,
                            new SQLiteParameter[] { new SQLiteParameter("@OldAction", OldAction),
                                                    new SQLiteParameter("@NewAction", NewAction) });
     strSQL = "UPDATE Schedule_RunStep SET Action=@NewAction WHERE Action=@OldAction";
     Sqlite.ExecuteNonQuery(strSQL,
                            new SQLiteParameter[] { new SQLiteParameter("@OldAction", OldAction),
                                                    new SQLiteParameter("@NewAction", NewAction) });
 }
Ejemplo n.º 9
0
 public void CopySchedule(string sSchName, string dSchName)
 {
     strSQL = "INSERT INTO Schedule_BaseData(ScheduleName,SiteProfile,StartDateTime,LastRunDateTime,Repeat,Status,SuccessfulMail,Mail,ReconnectTimes,ReconnectInterval,FileExistAction)"
              + "SELECT @dSchName,SiteProfile,StartDateTime,LastRunDateTime,Repeat,Status,SuccessfulMail,Mail,ReconnectTimes,ReconnectInterval,FileExistAction FROM Schedule_BaseData WHERE ScheduleName=@sSchName";
     Sqlite.ExecuteNonQuery(strSQL,
                            new SQLiteParameter[] { new SQLiteParameter("@sSchName", sSchName), new SQLiteParameter("@dSchName", dSchName) });
     strSQL = "INSERT INTO Schedule_RunStep(ScheduleName,Step,Action,RemoteFileFolder,RemoteIsFolder,LocalFileFolder,LocalIsFolder)"
              + " SELECT @dSchName,Step,Action,RemoteFileFolder,RemoteIsFolder,LocalFileFolder,LocalIsFolder FROM Schedule_RunStep WHERE ScheduleName=@sSchName";
     Sqlite.ExecuteNonQuery(strSQL,
                            new SQLiteParameter[] { new SQLiteParameter("@sSchName", sSchName), new SQLiteParameter("@dSchName", dSchName) });
 }
Ejemplo n.º 10
0
        public void MoveDataToSchedule()
        {
            strSQL = "DELETE FROM Schedule_RunStep";
            Sqlite.ExecuteNonQuery(strSQL, null);
            strSQL = "INSERT INTO Schedule_RunStep SELECT * FROM Schedule_RunStep_ForRestore";
            Sqlite.ExecuteNonQuery(strSQL, null);

            strSQL = "DELETE FROM Schedule_BaseData";
            Sqlite.ExecuteNonQuery(strSQL, null);
            strSQL = "INSERT INTO Schedule_BaseData SELECT * FROM Schedule_BaseData_ForRestore";
            Sqlite.ExecuteNonQuery(strSQL, null);
        }
Ejemplo n.º 11
0
 public void Addnewuploaditem(string SiteName, string Ftppath, string Filenamewithoutpath, string Localpath, string Type, string Filesize, string FtpFullFilePath, string LocalFullFilePath, string ModifyDate)
 {
     strSQL = "INSERT INTO UploadBreakpoint(SiteName,FtpPath,FileNameWithoutPath,LocalPath,Type,FileSize,FtpFullFilePath,LocalFullFilePath,ModifyDate) VALUES (@SiteName,@Ftppath,@Filenamewithoutpath,@Localpath,@Type,@Filesize,@FtpFullFilePath,@LocalFullFilePath,@ModifyDate)";
     Sqlite.ExecuteNonQuery(strSQL, new SQLiteParameter[] { new SQLiteParameter("@SiteName", SiteName),
                                                            new SQLiteParameter("@Ftppath", Ftppath),
                                                            new SQLiteParameter("@Filenamewithoutpath", Filenamewithoutpath),
                                                            new SQLiteParameter("@Localpath", Localpath),
                                                            new SQLiteParameter("@Type", Type),
                                                            new SQLiteParameter("@Filesize", Filesize),
                                                            new SQLiteParameter("@FtpFullFilePath", FtpFullFilePath),
                                                            new SQLiteParameter("@LocalFullFilePath", LocalFullFilePath),
                                                            new SQLiteParameter("@ModifyDate", ModifyDate) });
 }
Ejemplo n.º 12
0
 public void AddNewSiteProfile(string type, string SiteName, string SiteIP, string UserID, string Password, string RenameFile, string Description, string Port)
 {
     strSQL = "INSERT INTO SiteProfile(Type,SiteName,SiteIP,UserID,Password,RenameFile,Description,Port) VALUES (@type,@SiteName,@SiteIP,@UserID,@Password,@RenameFile,@Description,@Port)";
     Sqlite.ExecuteNonQuery(strSQL,
                            new SQLiteParameter[] { new SQLiteParameter("@type", type),
                                                    new SQLiteParameter("@SiteIP", SiteIP),
                                                    new SQLiteParameter("@UserID", UserID),
                                                    new SQLiteParameter("@Password", Password),
                                                    new SQLiteParameter("@SiteName", SiteName),
                                                    new SQLiteParameter("@RenameFile", RenameFile),
                                                    new SQLiteParameter("@Description", Description),
                                                    new SQLiteParameter("@Port", Port) });
 }
Ejemplo n.º 13
0
 public void UpdateSiteProfile(string type, string SiteName, string SiteIP, string UserID, string Password, string RenameFile, string Description, string Port)
 {
     strSQL = "UPDATE SiteProfile SET Type=@type,SiteIP=@SiteIP,UserID=@UserID,Password=@Password,RenameFile=@RenameFile,Description=@Description,Port=@Port WHERE SiteName=@SiteName";
     Sqlite.ExecuteNonQuery(strSQL,
                            new SQLiteParameter[] { new SQLiteParameter("@type", type),
                                                    new SQLiteParameter("@SiteIP", SiteIP),
                                                    new SQLiteParameter("@UserID", UserID),
                                                    new SQLiteParameter("@Password", Password),
                                                    new SQLiteParameter("@SiteName", SiteName),
                                                    new SQLiteParameter("@RenameFile", RenameFile),
                                                    new SQLiteParameter("@Description", Description),
                                                    new SQLiteParameter("@Port", Port) });
 }
Ejemplo n.º 14
0
 public void AddRestoreItemIntoScheduleRunStep(string ScheduleName, string Step, string Action,
                                               string RemoteFileFolder, string RemoteIsFolder, string LocalFileFolder, string LocalIsFolder)
 {
     strSQL = "INSERT INTO Schedule_RunStep_ForRestore(ScheduleName,Step,Action,RemoteFileFolder,RemoteIsFolder,LocalFileFolder,LocalIsFolder)" +
              " VALUES (@ScheduleName,@Step,@Action,@RemoteFileFolder,@RemoteIsFolder,@LocalFileFolder,@LocalIsFolder)";
     Sqlite.ExecuteNonQuery(strSQL,
                            new SQLiteParameter[] { new SQLiteParameter("@ScheduleName", ScheduleName),
                                                    new SQLiteParameter("@Step", Step),
                                                    new SQLiteParameter("@Action", Action),
                                                    new SQLiteParameter("@RemoteFileFolder", RemoteFileFolder),
                                                    new SQLiteParameter("@RemoteIsFolder", RemoteIsFolder),
                                                    new SQLiteParameter("@LocalFileFolder", LocalFileFolder),
                                                    new SQLiteParameter("@LocalIsFolder", LocalIsFolder) });
 }
Ejemplo n.º 15
0
 public void AddRestoreItemIntoScheduleBaseData(string ScheduleName, string SiteProfile,
                                                string StartDateTime, string LastRunDateTime, string Repeat, string Status, string SuccessfulMail, string Mail, string ReconnectTimes, string ReconnectInterval, string FileExistAction)
 {
     strSQL = "INSERT INTO Schedule_BaseData_ForRestore(ScheduleName,SiteProfile,StartDateTime,LastRunDateTime,Repeat,Status,SuccessfulMail,Mail,ReconnectTimes,ReconnectInterval,FileExistAction)" +
              " VALUES (@ScheduleName,@SiteProfile,@StartDateTime,@LastRunDateTime,@Repeat,@Status,@SuccessfulMail,@Mail,@ReconnectTimes,@ReconnectInterval,@FileExistAction)";
     Sqlite.ExecuteNonQuery(strSQL,
                            new SQLiteParameter[] { new SQLiteParameter("@ScheduleName", ScheduleName),
                                                    new SQLiteParameter("@SiteProfile", SiteProfile),
                                                    new SQLiteParameter("@StartDateTime", StartDateTime),
                                                    new SQLiteParameter("@LastRunDateTime", LastRunDateTime),
                                                    new SQLiteParameter("@Repeat", Repeat),
                                                    new SQLiteParameter("@Status", Status),
                                                    new SQLiteParameter("@SuccessfulMail", SuccessfulMail),
                                                    new SQLiteParameter("@Mail", Mail),
                                                    new SQLiteParameter("@ReconnectTimes", ReconnectTimes),
                                                    new SQLiteParameter("@ReconnectInterval", ReconnectInterval),
                                                    new SQLiteParameter("@FileExistAction", FileExistAction) });
 }
Ejemplo n.º 16
0
 public void UpdateScheduleBaseData(string SchName, string SiteProfile, string StartDateTime,
                                    string LastRunDateTime, string Repeat, string Status, string SuccessfulMail, string Mail,
                                    string ReconnectTimes, string ReconnectInterval, string FileExistAction)
 {
     strSQL = "UPDATE Schedule_BaseData SET SiteProfile=@SiteProfile,StartDateTime=@StartDateTime,LastRunDateTime=@LastRunDateTime,Repeat=@Repeat,Status=@Status,SuccessfulMail=@SuccessfulMail,Mail=@Mail,ReconnectTimes=@ReconnectTimes,ReconnectInterval=@ReconnectInterval,FileExistAction=@FileExistAction" +
              " WHERE ScheduleName=@SchName";
     Sqlite.ExecuteNonQuery(strSQL,
                            new SQLiteParameter[] { new SQLiteParameter("@SchName", SchName),
                                                    new SQLiteParameter("@StartDateTime", StartDateTime),
                                                    new SQLiteParameter("@SiteProfile", SiteProfile),
                                                    new SQLiteParameter("@LastRunDateTime", LastRunDateTime),
                                                    new SQLiteParameter("@Repeat", Repeat),
                                                    new SQLiteParameter("@Status", Status),
                                                    new SQLiteParameter("@SuccessfulMail", SuccessfulMail),
                                                    new SQLiteParameter("@Mail", Mail),
                                                    new SQLiteParameter("@ReconnectTimes", ReconnectTimes),
                                                    new SQLiteParameter("@ReconnectInterval", ReconnectInterval),
                                                    new SQLiteParameter("@FileExistAction", FileExistAction) });
 }
Ejemplo n.º 17
0
        public void SaveUploadlist(string SiteName, string Localpath, string Filenamewithoutpath, string Ftppath, string Type, string Filesize, string LocalFullFilePath, string FtpFullFilePath, string ModifyDate)
        {
            strSQL = "SELECT * FROM UploadBreakpoint WHERE SiteName=@SiteName AND LocalPath=@Localpath AND FileNameWithoutPath=@Filenamewithoutpath AND FtpPath=@Ftppath AND FileSize=@Filesize AND LocalFullFilePath=@LocalFullFilePath";
            DataTable dt = Sqlite.ExecuteDataTable(strSQL, new SQLiteParameter[] { new SQLiteParameter("@SiteName", SiteName),
                                                                                   new SQLiteParameter("@Ftppath", Ftppath),
                                                                                   new SQLiteParameter("@Filenamewithoutpath", Filenamewithoutpath),
                                                                                   new SQLiteParameter("@Localpath", Localpath),
                                                                                   new SQLiteParameter("@Filesize", Filesize),
                                                                                   new SQLiteParameter("@LocalFullFilePath", LocalFullFilePath) });

            if (dt.Rows.Count == 0)
            {
                Addnewuploaditem(SiteName, Ftppath, Filenamewithoutpath, Localpath, Type, Filesize, FtpFullFilePath, LocalFullFilePath, ModifyDate);
            }
            else
            {
                strSQL = "DELETE FROM UploadBreakpoint WHERE SiteName=@SiteName AND FtpPath=@Ftppath AND FileNameWithoutPath=@Filenamewithoutpath AND LocalPath=@Localpath";
                Sqlite.ExecuteNonQuery(strSQL, new SQLiteParameter[] { new SQLiteParameter("@SiteName", SiteName),
                                                                       new SQLiteParameter("@Ftppath", Ftppath),
                                                                       new SQLiteParameter("@Filenamewithoutpath", Filenamewithoutpath),
                                                                       new SQLiteParameter("@Localpath", Localpath) });
                Addnewuploaditem(SiteName, Ftppath, Filenamewithoutpath, Localpath, Type, Filesize, FtpFullFilePath, LocalFullFilePath, ModifyDate);
            }
        }
Ejemplo n.º 18
0
 public void DeleteAllUnfinishedUploadItem(string SiteName)
 {
     strSQL = "DELETE FROM UploadBreakpoint WHERE SiteName=@SiteName";
     Sqlite.ExecuteNonQuery(strSQL, new SQLiteParameter[] { new SQLiteParameter("@SiteName", SiteName) });
 }
Ejemplo n.º 19
0
 public void DeleteAction(string Action)
 {
     strSQL = "DELETE FROM ActionType WHERE Action=@Action";
     Sqlite.ExecuteNonQuery(strSQL,
                            new SQLiteParameter[] { new SQLiteParameter("@Action", Action) });
 }
Ejemplo n.º 20
0
 public void DeleteSiteProfileRestoreTable()
 {
     strSQL = "DELETE FROM SiteProfile_ForRestore";
     Sqlite.ExecuteNonQuery(strSQL, null);
 }
Ejemplo n.º 21
0
 public void DeleteScheduleActionData(string SchName)
 {
     strSQL = "DELETE FROM Schedule_RunStep WHERE ScheduleName=@SchName";
     Sqlite.ExecuteNonQuery(strSQL,
                            new SQLiteParameter[] { new SQLiteParameter("@SchName", SchName) });
 }
Ejemplo n.º 22
0
 public void UpdateLastRunTime(string SchName, string Time)
 {
     strSQL = "UPDATE Schedule_BaseData SET LastRunDateTime=@Time WHERE ScheduleName=@SchName";
     Sqlite.ExecuteNonQuery(strSQL, new SQLiteParameter[] { new SQLiteParameter("@SchName", SchName), new SQLiteParameter("@Time", Time) });
 }
Ejemplo n.º 23
0
 public void DeleteActionRestoreTable()
 {
     strSQL = "DELETE FROM ActionType_ForRestore";
     Sqlite.ExecuteNonQuery(strSQL, null);
 }
Ejemplo n.º 24
0
 public void AddRestoreItemIntoAction(string Action)
 {
     strSQL = "INSERT INTO ActionType_ForRestore(Action) VALUES (@Action)";
     Sqlite.ExecuteNonQuery(strSQL,
                            new SQLiteParameter[] { new SQLiteParameter("@Action", Action) });
 }
Ejemplo n.º 25
0
 public void DeleteSiteProfile(string SiteName)
 {
     strSQL = "DELETE FROM SiteProfile WHERE SiteName=@SiteName";
     Sqlite.ExecuteNonQuery(strSQL,
                            new SQLiteParameter[] { new SQLiteParameter("@SiteName", SiteName) });
 }
Ejemplo n.º 26
0
 public void AddNewActionType(string Action)
 {
     strSQL = "INSERT INTO ActionType(Action) VALUES (@Action)";
     Sqlite.ExecuteNonQuery(strSQL,
                            new SQLiteParameter[] { new SQLiteParameter("@Action", Action) });
 }