BigLitho/Large.Lito.Data/Sql/Scripts.cs

202 lines
8.9 KiB
C#

using System;
using System.Collections.Generic;
using System.Text;
namespace Big.Lito.Data.Sql
{
public static class Scripts
{
/// <summary>
/// Sql to get a project details by Id
/// </summary>
public static readonly string sqlGetProjectById = "Select" +
" Id, [Project name], [Author], [Created], [Last updated]," +
" [FrameWidth], [FrameHeight], [ResW], [ResH], [ObjName], [ObjW], [ObjH]," +
" [NRows], [NCols], [CoX], [CoY], [NSlices], [NSlicesTexture], [LowLevelBrightness], " +
" [HighLevelBrightness], [Repeats], [HomeDir], [BlenderDir]" +
" From ProjectSettings Where Id = @Id";
/// <summary>
/// Sql to get a project details by name
/// </summary>
public static readonly string sqlGetProjectByName = "Select" +
" Id, [Project name], [Author], [Created], [Last updated]," +
" [FrameWidth], [FrameHeight], [ResW], [ResH], [ObjName], [ObjW], [ObjH]," +
" [NRows], [NCols], [CoX], [CoY], [NSlices], [NSlicesTexture], [LowLevelBrightness], " +
" [HighLevelBrightness], [Repeats], [HomeDir], [BlenderDir]" +
" From ProjectSettings Where [Project name] = @ProjectName";
/// <summary>
/// Sql to get all club members
/// </summary>
public static readonly string SqlGetAllProjects = "Select" +
" Id, [Project name], [Author], [Created], [Last updated]," +
" [FrameWidth], [FrameHeight], [ResW], [ResH], [ObjName], [ObjW], [ObjH]," +
" [NRows], [NCols], [CoX], [CoY], [NSlices], [NSlicesTexture], [LowLevelBrightness], " +
" [HighLevelBrightness], [Repeats], [HomeDir], [BlenderDir]" +
" From ProjectSettings";
/// <summary>
/// Sql to get all club members
/// </summary>
public static readonly string SqlGetAllProjectsForGridView = "Select" +
" [Project name], [Author], [Created], [Last updated]," +
" [ObjName]" +
" From ProjectSettings";
/// <summary>
/// sql to insert a club member details
/// </summary>
public static readonly string SqlInsertProject = "Insert Into" +
" ProjectSettings([Project name], [Author], [Created], [Last updated], [HomeDir])" +
" Values(@ProjectName, @Author, @Created, @LastUpdated, @HomeDir)";
/// <summary>
/// sql to search for club members
/// </summary>
public static readonly string SqlSearchClubMembers = "Select " +
" Id, Name, DateOfBirth, Occupation, MaritalStatus, HealthStatus, Salary, NumberOfChildren" +
" From ClubMember Where (@Occupation Is NULL OR @Occupation = Occupation) {0}" +
" (@MaritalStatus Is NULL OR @MaritalStatus = MaritalStatus)";
/// <summary>
/// sql to update project details
/// </summary>
public static readonly string SqlUpdateProject = "Update ProjectSettings " +
" Set [Project name] = @ProjectName, [Author] = @Author, [Last updated] = @LastUpdated, [HomeDir]) = @HomeDir " +
" Where([Id] = @Id)";
/// <summary>
/// sql to update IniGen part of project details
/// </summary>
public static readonly string SqlUpdateProjectIniGen = "Update ProjectSettings " +
" Set [Last updated] = @LastUpdated, [FrameWidth] = @FrameWidth, [FrameHeight] = @FrameHeight," +
" [ResW] = @ResW, [ResH] = @ResH, [ObjName] = @ObjName, [ObjH] = @ObjH, [ObjW] = @ObjW, " +
" [NRows] = @NRows, [NCols] = @NCols, [CoX] = @CoX, [CoY] = @CoY " +
" Where([Id] = @Id)";
/// <summary>
/// sql to delete a project record
/// </summary>
public static readonly string SqlDeleteProject = "Delete From ProjectSettings Where (Id = @Id)";
/// <summary>
/// Sql to get a project details by Id
/// </summary>
public static readonly string sqlGetHeightmapByProjectId = "Select" +
" [HighLevelBrightness], [LowLevelBrightness], [NSlices], [Repeats]" +
" From ProjectSettings Where Id = @Id";
/// <summary>
/// Sql to get a project details by name
/// </summary>
public static readonly string sqlGetHeightmapByProjectName = "Select" +
" [HighLevelBrightness], [LowLevelBrightness], [NSlices], [Repeats]" +
" From ProjectSettings Where [Project name] = @ProjectName";
public static readonly string SqlUpdateHeightMap = "Update ProjectSettings " +
" Set [HighLevelBrightness] = @HighLevelBrightness, [LowLevelBrightness] = @LowLevelBrightness," +
" [NSlices] = @NSlices, [NSlicesTexture] = @NSlicesTexture, [MaxSlices] = @MaxSlices," +
" [BorderSize] = @BorderSize, [PictureWidth] = @PictureWidth, [Repeats] = @Repeats " +
" Where([Id] = @Id)";
public static readonly string SqlUpdateSystemSettings = "Update ProjectSettings " +
" Set [HomeDir] = @HomeDir, [BlenderDir] = @BlenderDir" +
" Where([Id] = @Id)";
/// <summary>
/// Sql to get a progress details by Id
/// </summary>
public static readonly string sqlGetProgressById = "Select" +
" Id, [name], [start], [end], [val], [projectId]" +
" From BtoFProgress Where Id = @Id";
/// <summary>
/// Sql to get all club members
/// </summary>
public static readonly string SqlGetAllProgress = "Select" +
" Id, [name], [start], [end], [val], [projectId]" +
" From BtoFProgress";
/// <summary>
/// Sql to update progress details by Id
/// </summary>
public static readonly string sqlUpdateProgress = "Update BtoFProgress" +
" Set [name] = @ProgressName, [start] = @start, [end] = @end, [val] = @val, [projectId]" +
" Where Id = @Id";
/// <summary>
/// Sql to update progress details by name
/// </summary>
public static readonly string SqlUpdateProgressByName = "Update BtoFProgress" +
" Set [start] = @start, [end] = @end, [val] = @val" +
" Where [name] = @name";
/// <summary>
/// Sql to update progress details by name
/// </summary>
public static readonly string SqlInsertProcessLevel = "Insert Into" +
" ProcessLevels([name], [start], [end])" +
" Values(@name, @start, @end)";
/// <summary>
/// Sql to update progress details by name
/// </summary>
public static readonly string sqlUpdateProcessLevelsByName = "Update ProcessLevels" +
" Set [start] = @start, [end] = @end" +
" Where [name] = @name";
/// <summary>
/// Sql to get a project details by name
/// </summary>
public static readonly string sqlGetProcessLevelsByName = "Select" +
" [start], [end]" +
" From ProcessLevels Where [name] = @Name";
/// <summary>
/// Sql to get a progress details by Id
/// </summary>
public static readonly string sqlUpdateProjectId = "Update BtoFProgress" +
" Set [projectId] = @projectId" + " Where Id = @Id";
/// <summary>
/// Sql to get a project details by name
/// </summary>
public static readonly string sqlGetProgressByName = "Select" +
" Id, [start], [end], [val], [val_ext]" +
" From BtoFProgress Where [name] = @ProgressName";
/// <summary>
/// sql to delete a project record
/// </summary>
public static readonly string SqlDeleteProgress = "Delete From BtoFProgress Where (Id = @Id)";
/// <summary>
/// Sql to update progress details by name
/// </summary>
public static readonly string sqlUpdateFToBIniGen = "Update FToBIniGen" +
" Set [ObjName] = @ObjName, [CoX] = @CoX, [CoY] = @CoY, [WRes] = @WRes," +
" [HRes] = @HRes, [FrmW] = @FrmW, [FrmH] = @FrmH, [NRows] = @NRows, [NCols] = @NCols," +
" [FilePath] = @FilePath Where [Name] = @Name";
/// <summary>
/// Sql to update progress details by name
/// </summary>
public static readonly string sqlUpdateCancelFToBIniGen = "Update FToBIniGen" +
" Set [cancelIniGen] = @cancelIniGen Where [Name] = @Name";
/// <summary>
/// Sql to update progress details by name
/// </summary>
public static readonly string sqlUpdateRepeatsFToBIniGen = "Update FToBIniGen" +
" Set [repeats] = @repeats Where [Name] = @Name";
/// <summary>
/// Sql to update progress details by name
/// </summary>
public static readonly string sqlUpdateRowStartEndFToBIniGen = "Update FToBIniGen" +
" Set [row_start] = @row_start, [row_end] = @row_end Where [Name] = @Name";
}
}