Exemplo n.º 1
0
    void GV_Bind()
    {
        DataView dv;

        dv = (DataView)SqlDataSourceUsers.Select(DataSourceSelectArguments.Empty);
        if (dv.Count > 0)
        {
            dv.RowFilter             = "UserTypeCode='" + RadioButtonList1.SelectedValue + "'";
            GridViewUsers.DataSource = dv;
            GridViewUsers.DataBind();
        }
    }
Exemplo n.º 2
0
    protected void ButtonLink_Click(object sender, EventArgs e)
    {
        //ArrayList al = new ArrayList();
        foreach (GridViewRow R in GvPundles.Rows)
        {
            Session["UserRoleId"] = R.Cells[0].Text.Trim();
            //SqlDataSourceUsers.Delete();
            RadioButton ch = (RadioButton)R.FindControl("C1");

            if (ch.Checked)
            {
                foreach (GridViewRow RR in GridViewUsers.Rows)
                {
                    Session["UserId"] = RR.Cells[0].Text.Trim();
                    RadioButton chh = (RadioButton)RR.FindControl("C1");
                    if (chh.Checked)
                    {
                        SqlDataSourceUsers.Update();
                    }
                }
            }
            LabelErrorMessage.Text = "تم حفظ البيانات";
        }
    }