public DataTable GetScheduleToAdd(string schName) { strSQL = "SELECT ScheduleName,SiteProfile,StartDateTime,LastRunDateTime,Repeat,Status,Mail,SuccessfulMail,FileExistAction FROM Schedule_BaseData WHERE ScheduleName=@schName"; DataTable dt = Sqlite.ExecuteDataTable(strSQL, new SQLiteParameter[] { new SQLiteParameter("@schName", schName) }); return(dt); }
public DataTable GetUploadBreakpointResumeFileList(string SiteName) { strSQL = "SELECT LocalPath,FileNameWithoutPath,FtpPath,Type,FileSize,LocalFullFilePath,FtpFullFilePath,ModifyDate FROM UploadBreakpoint WHERE SiteName=@SiteName"; DataTable dt = Sqlite.ExecuteDataTable(strSQL, new SQLiteParameter[] { new SQLiteParameter("@SiteName", SiteName) }); return(dt); }
public DataTable GetBLLSiteProfile(string SchName) { strSQL = "SELECT Type,SiteName,SiteIP,UserID,Password,RenameFile,Port FROM SiteProfile WHERE SiteName =(SELECT SiteProfile FROM Schedule_BaseData WHERE ScheduleName=@SchName)"; DataTable dt = Sqlite.ExecuteDataTable(strSQL, new SQLiteParameter[] { new SQLiteParameter("@SchName", SchName) }); return(dt); }
public DataTable GetReconnectTimesAndInterval(string SchName) { strSQL = "SELECT ReconnectTimes,ReconnectInterval FROM Schedule_BaseData WHERE ScheduleName=@SchName"; DataTable dt = Sqlite.ExecuteDataTable(strSQL, new SQLiteParameter[] { new SQLiteParameter("@SchName", SchName) }); return(dt); }
public DataTable GetMailAccountSetting() { strSQL = "SELECT MailFrom,SMTP,Account,Password FROM Mail"; DataTable dt = Sqlite.ExecuteDataTable(strSQL, null); return(dt); }
public DataTable GetSiteProfileToBackup() { strSQL = "SELECT Type,SiteName,SiteIP,UserID,Password,RenameFile,Description,Port FROM SiteProfile"; DataTable dt = Sqlite.ExecuteDataTable(strSQL, null); return(dt); }
public DataTable GetSiteProfile() { strSQL = "SELECT SiteName FROM SiteProfile"; DataTable dt = Sqlite.ExecuteDataTable(strSQL, null); return(dt); }
public DataTable GetMainFormScheduleList() { strSQL = "SELECT ScheduleName,SiteProfile,StartDateTime,LastRunDateTime,Repeat,Status,Mail,SuccessfulMail,FileExistAction FROM Schedule_BaseData"; DataTable dt = Sqlite.ExecuteDataTable(strSQL, null); return(dt); }
public DataTable GetActionType() { strSQL = "SELECT Action FROM ActionType"; DataTable dt = Sqlite.ExecuteDataTable(strSQL, null); return(dt); }
public DataTable GetOldScheduleActionData(string SchName) { strSQL = "SELECT Step,Action,RemoteFileFolder,RemoteIsFolder,LocalFileFolder,LocalIsFolder FROM Schedule_RunStep WHERE ScheduleName=@SchName"; DataTable dt = Sqlite.ExecuteDataTable(strSQL, new SQLiteParameter[] { new SQLiteParameter("@SchName", SchName) }); return(dt); }
public DataTable GetSiteProfileDetail(string SiteName) { strSQL = "SELECT Type,SiteIP,UserID,Password,RenameFile,Description,Port FROM SiteProfile WHERE SiteName=@SiteName"; DataTable dt = Sqlite.ExecuteDataTable(strSQL, new SQLiteParameter[] { new SQLiteParameter("@SiteName", SiteName) }); return(dt); }
public DataTable GetOldScheduleBaseData(string SchName) { strSQL = "SELECT StartDateTime,Repeat,Status,SuccessfulMail,Mail,ReconnectTimes,ReconnectInterval,FileExistAction FROM Schedule_BaseData WHERE ScheduleName=@SchName"; DataTable dt = Sqlite.ExecuteDataTable(strSQL, new SQLiteParameter[] { new SQLiteParameter("@SchName", SchName) }); return(dt); }
public DataTable GetBLLSchRunStep(string SchName) { //strSQL = "SELECT Step,Action,RemoteFileFolder,RemoteIsFolder,LocalFileFolder,LocalIsFolder FROM Schedule_RunStep WHERE ScheduleName=@SchName ORDER BY Step"; strSQL = "SELECT a.Step,a.Action,a.RemoteFileFolder,a.RemoteIsFolder,a.LocalFileFolder,a.LocalIsFolder,b.FileExistAction " + " FROM Schedule_RunStep a INNER JOIN Schedule_BaseData b ON a.ScheduleName = b.ScheduleName AND a.ScheduleName=@SchName ORDER BY a.Step"; DataTable dt = Sqlite.ExecuteDataTable(strSQL, new SQLiteParameter[] { new SQLiteParameter("@SchName", SchName) }); return(dt); }
public bool CheckUploadIsFinished(string SiteName) { strSQL = "SELECT TOP 1 FileNameWithoutPath FROM UploadBreakpoint WHERE SiteName=@SiteName"; DataTable dt = Sqlite.ExecuteDataTable(strSQL, new SQLiteParameter[] { new SQLiteParameter("@SiteName", SiteName) }); if (dt.Rows.Count == 0) { return(true); } else { return(false); } }
public DataSet GetScheduleToBackup() { strSQL = "SELECT * FROM Schedule_BaseData"; DataTable dt1 = Sqlite.ExecuteDataTable(strSQL, null); dt1.TableName = "Schedule_BaseData"; strSQL = "SELECT * FROM Schedule_RunStep"; DataTable dt2 = Sqlite.ExecuteDataTable(strSQL, null); dt2.TableName = "Schedule_RunStep"; DataSet ds = new DataSet(); ds.Tables.Add(dt1); ds.Tables.Add(dt2); return(ds); }
public bool IsSiteProfileExist(string SiteName) { strSQL = "SELECT SiteIP FROM SiteProfile WHERE SiteName=@SiteName"; using (DataTable dt = Sqlite.ExecuteDataTable(strSQL, new SQLiteParameter[] { new SQLiteParameter("@SiteName", SiteName) })) { if (dt.Rows.Count == 0) { return(false); } else { return(true); } } }
public bool CheckScheduleNameIsAlreadyExist(string SchName) { strSQL = "SELECT ScheduleName FROM Schedule_BaseData WHERE ScheduleName=@SchName"; using (DataTable dt = Sqlite.ExecuteDataTable(strSQL, new SQLiteParameter[] { new SQLiteParameter("@SchName", SchName) })) { if (dt.Rows.Count == 0) { return(false); } else { return(true); } } }
public bool CheckActionIsAlreadyExist(string Action) { strSQL = "SELECT Action FROM ActionType WHERE Action=@Action"; using (DataTable dt = Sqlite.ExecuteDataTable(strSQL, new SQLiteParameter[] { new SQLiteParameter("@Action", Action) })) { if (dt.Rows.Count == 0) { return(false); } else { return(true); } } }
public bool CheckActionIsAlreadyUsed(string Action) { strSQL = "SELECT Action FROM Schedule_RunStep WHERE Action=@Action Limit 1"; using (DataTable dt = Sqlite.ExecuteDataTable(strSQL, new SQLiteParameter[] { new SQLiteParameter("@Action", Action) })) { if (dt.Rows.Count == 0) { return(false); } else { return(true); } } }
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); } }