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

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

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

            return(SqlDataAccess.DeleteData(sql, userId));
        }
Ejemplo n.º 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()));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }