// 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));
        }
Exemple #2
0
        public static List <UserModel> LoadUser(string username)
        {
            var sql = $@"SELECT * FROM user WHERE UserName = '******'";

            return(SqlDataAccess.LoadData <UserModel>(sql));
        }
Exemple #3
0
        public static List <EmployeeModel> SelectEmployees(string EmailAddress, string password)
        {
            string sql = @"select * from dbo.Employee where EmailAddress='" + EmailAddress + @"';";

            return(SqlDataAccess.LoadData <EmployeeModel>(sql));
        }
Exemple #4
0
        public static List <string> GetTables(string userId)
        {
            string sql = $"SELECT name FROM sys.tables WHERE name LIKE '{userId}@%'";

            return(SqlDataAccess.LoadData <string>(sql));
        }
Exemple #5
0
        public static List <EmployeeModel> LoadEmployees()
        {
            string sql = @"select Id, EmployeeId, FirstName, LastName, EmailAddress from dbo.Employee;";

            return(SqlDataAccess.LoadData <EmployeeModel>(sql));
        }
Exemple #6
0
        public static int DeleteUser(Guid userId)
        {
            string sql = "delete from dbo.Users where UserId = @UserId";

            return(SqlDataAccess.DeleteData(sql, userId));
        }
Exemple #7
0
        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()));
        }
Exemple #8
0
        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));
        }
Exemple #9
0
        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));
        }