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

            return(SqlDataAccess.LoadData <UserModel>(sql));
        }
Example #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));
        }
Example #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));
        }
Example #5
0
        public static List <EmployeeModel> LoadEmployees()
        {
            string sql = @"select Id, EmployeeId, FirstName, LastName, EmailAddress from dbo.Employee;";

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

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