Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DataAccessLayer dao = new DataAccessLayer();

            if (!String.IsNullOrEmpty(Request.QueryString["agentID"]))
            {
                param = Convert.ToInt32(Request.QueryString["agentID"]);
                SqlDataReader reader;

                reader = dao.SelectUserByID(param);
                while (reader.Read())
                {
                    agentName.InnerText  = reader.GetString(2).ToString();
                    agentDesc.InnerText  = reader.GetString(9).ToString();
                    agentEmail.InnerText = reader.GetString(5).ToString();
                    agentPhone.InnerText = reader.GetString(3).ToString();
                    agentSkype.InnerText = reader.GetString(11).ToString();
                    string profPic = reader.GetString(12);
                    propUserName.Value    = agentEmail.InnerText.ToString();
                    agentProfile.ImageUrl = "userassets/" + reader.GetString(5) + "/" + profPic;

                    SqlDataReader reader2 = dao.GetUserPropertiesbyAgentID(param, Constants.isApproved);
                    Repeater1.DataSource = reader2;
                    Repeater1.DataBind();
                }
            }
            else
            {
                Response.Redirect("Error-404.aspx");
            }
        }