示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DataAccessLayer dao           = new DataAccessLayer();
            int             usertype      = Constants.user;
            int             isApproved    = Constants.isApproved;
            int             isNotApproved = Constants.isNotApproved;
            int             numberofUsers = dao.UsersCount(usertype);

            usersCount.Text = "" + numberofUsers;

            int numberofProperties = dao.PropertiesCount(0);

            propertiesCount.Text = "" + numberofProperties;

            int approvedPropCount = dao.PropertiesCount(isApproved);

            labelApproved.Text = "" + approvedPropCount;

            int unApprovedPropCount = dao.PropertiesCount(isNotApproved);

            labelUnapproved.Text = "" + unApprovedPropCount;
        }