Exemple #1
0
        public DataTable getHousesNeedConnectToClient(int?agentID = null)
        {
            clsDBconnection db = new clsDBconnection();

            return(db.ExecReader("select * from houses h where " + (agentID != null ? "employee = " + agentID + " and " : "") +
                                 " not exists (select * from clients where type <> 3 and id = h.client)"));
        }
Exemple #2
0
        public DataTable getHousesForSales(int?agentID)
        {
            clsDBconnection db = new clsDBconnection();

            return(db.ExecReader("select * from houses h where " + (agentID != null ? "employee = " + agentID + " and " : "") +
                                 " status = 3 and not exists (select * from sales where house = h.id)"));
        }
Exemple #3
0
        public DataRow getClient(int clientID)
        {
            clsDBconnection db  = new clsDBconnection();
            DataTable       tmp = db.ExecReader("select * from clients where type <> 3 and id = " + clientID);

            if (tmp.Rows.Count != 0)
            {
                return(tmp.Rows[0]);
            }
            return(null);
        }
Exemple #4
0
        public DataTable getClientsNeedConnectToHouse()
        {
            clsDBconnection db = new clsDBconnection();

            return(db.ExecReader("select * from clients c where type <> 3"));
        }
Exemple #5
0
        public DataTable getEmployees()
        {
            clsDBconnection db = new clsDBconnection();

            return(db.ExecReader("select * from employees"));
        }
Exemple #6
0
        public DataTable getMessages()
        {
            clsDBconnection db = new clsDBconnection();

            return(db.ExecReader("select * from messages"));
        }
Exemple #7
0
        public DataTable getMessages(int agentID)
        {
            clsDBconnection db = new clsDBconnection();

            return(db.ExecReader("select * from messages where employee = " + agentID));
        }