// get all the manufacturing time line and part combo public static List <manufacturingTimeModel> LoadManufacturingIds() { string sql = @"select lineId,partId from [ManufacturingTime];"; return(SqlDataAccess.LoadData <manufacturingTimeModel>(sql)); }
public static List <UserModel> LoadUser(string username) { var sql = $@"SELECT * FROM user WHERE UserName = '******'"; return(SqlDataAccess.LoadData <UserModel>(sql)); }
public static List <EmployeeModel> SelectEmployees(string EmailAddress, string password) { string sql = @"select * from dbo.Employee where EmailAddress='" + EmailAddress + @"';"; return(SqlDataAccess.LoadData <EmployeeModel>(sql)); }
public static List <string> GetTables(string userId) { string sql = $"SELECT name FROM sys.tables WHERE name LIKE '{userId}@%'"; return(SqlDataAccess.LoadData <string>(sql)); }
public static List <EmployeeModel> LoadEmployees() { string sql = @"select Id, EmployeeId, FirstName, LastName, EmailAddress from dbo.Employee;"; return(SqlDataAccess.LoadData <EmployeeModel>(sql)); }
public static int DeleteUser(Guid userId) { string sql = "delete from dbo.Users where UserId = @UserId"; return(SqlDataAccess.DeleteData(sql, userId)); }
public static List <Bid> LoadBidsForCompany(int companyId) //load bids created by a specific company { string sql = @"SELECT * FROM dbo.bids WHERE CompanyId = @OwnerId"; return(SqlDataAccess.LoadData <Bid>(sql, companyId.ToString())); }
public static List <Bid> LoadBids(string gigId) //load a list of bids for a single id { string sql = @"SELECT * FROM dbo.Bids WHERE GigId = @OwnerId"; return(SqlDataAccess.LoadData <Bid>(sql, gigId)); }
public static List <TicketModel> LoadTickets(string userId, string projectName) { string sql = $@"select Id, Status, Urgency, Description from dbo.{userId}@{projectName};"; return(SqlDataAccess.LoadData <TicketModel>(sql)); }