Exemple #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            int RpC = 0;
            try
            {
                RpC = Convert.ToInt32(Request.QueryString["Rpc"]);
            }
            catch
            {
            }

            using (var db = new Entities())
            {
                if (RpC == 1 || RpC == 2)
                {
                    var dt = (from it in db.usercontact
                              where it.usclass == RpC - 1
                              select it).ToList();
                    RptCon.DataSource = dt;
                    RptCon.DataBind();
                    DdlCon.SelectedValue = RpC.ToString();
                }
                else
                {
                    var dt = (from it in db.usercontact
                              select it).ToList();
                    RptCon.DataSource = dt;
                    RptCon.DataBind();
                }
            }
        }
    }
Exemple #2
0
 protected void PageBind(List <Applist> a)
 {
     RptCon.DataSource = a;
     RptCon.DataBind();
 }