Beispiel #1
0
    protected void RadioButton2_CheckedChanged(object sender, EventArgs e)
    {
        MultiView1.ActiveViewIndex = 1;


        CDT = CAdapter.selectbyemail(Session["email"].ToString());
        CheckBoxList1.DataSource     = CDT;
        CheckBoxList1.DataTextField  = "Toemail";
        CheckBoxList1.DataValueField = "cid";
        CheckBoxList1.DataBind();
    }
Beispiel #2
0
 protected void RadioButton1_CheckedChanged(object sender, EventArgs e)
 {
     MultiView1.ActiveViewIndex = 0;
     if (Page.IsPostBack == false)
     {
         CDT = CAdapter.selectbyemail(Session["email"].ToString());
         DropDownList1.DataSource     = CDT;
         DropDownList1.DataTextField  = "Toemail";
         DropDownList1.DataValueField = "cid";
         DropDownList1.DataBind();
     }
 }
Beispiel #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.IsPostBack == false)
        {
            UDT = UAdapter.selectforDisplay(Convert.ToInt32(Session["uid"].ToString()), Session["email"].ToString());
            chkfrnd.DataSource     = UDT;
            chkfrnd.DataTextField  = "Email";
            chkfrnd.DataValueField = "UID";
            chkfrnd.DataBind();

            CDT = CAdapter.selectbyemail(Session["email"].ToString());
            GvFrind.DataSource = CDT;
            GvFrind.DataBind();
        }
    }
Beispiel #4
0
    protected void GvFrind_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        int de = CAdapter.Delete(Convert.ToInt32(GvFrind.DataKeys[e.RowIndex].Value));

        CDT = CAdapter.selectbyemail(Session["email"].ToString());
        GvFrind.DataSource = CDT;
        GvFrind.DataBind();

        UDT = UAdapter.selectforDisplay(Convert.ToInt32(Session["uid"].ToString()), Session["email"].ToString());
        chkfrnd.DataSource     = UDT;
        chkfrnd.DataTextField  = "Email";
        chkfrnd.DataValueField = "UID";
        chkfrnd.DataBind();

        lbladd.Text      = "Contact Removed Successfully !!";
        lbladd.ForeColor = System.Drawing.Color.Red;
    }
Beispiel #5
0
    protected void btnadd_Click(object sender, EventArgs e)
    {
        lbladd.ForeColor = System.Drawing.Color.Blue;
        lbladd.Text      = "";
        lblmsg.Text      = "";
        for (int i = 0; i < chkfrnd.Items.Count; i++)
        {
            if (chkfrnd.Items[i].Selected == true)
            {
                int ist = CAdapter.Insert(Session["email"].ToString(), chkfrnd.Items[i].Text, System.DateTime.Now.Date);
                lbladd.Text = "Contact Added Successfully!!'";
            }
        }

        CDT = CAdapter.selectbyemail(Session["email"].ToString());
        GvFrind.DataSource = CDT;
        GvFrind.DataBind();

        UDT = UAdapter.selectforDisplay(Convert.ToInt32(Session["uid"].ToString()), Session["email"].ToString());
        chkfrnd.DataSource     = UDT;
        chkfrnd.DataTextField  = "Email";
        chkfrnd.DataValueField = "UID";
        chkfrnd.DataBind();
    }