Example #1
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        if (ddlRole.SelectedIndex > 0 && ddlParticipant.SelectedIndex > 0)
        {
            string roleVal = ddlRole.SelectedValue;
            int    uid     = Convert.ToInt32(ddlParticipant.SelectedValue);

            RolesBLL roleLogic = new RolesBLL();
            if (roleLogic.GetUIDcount(uid, li_wonum, ls_proj) == 0)
            {
                int ndx = roleLogic.GetMaxRolesIndex();
                if (roleLogic.InsertWOroles(li_wonum, uid, ls_proj, roleVal, false, true))
                {
                    ddlParticipant.Items.RemoveAt(ddlParticipant.SelectedIndex);
                    ddlParticipant.SelectedIndex = -1;
                    ddlRole.SelectedIndex        = -1;
                    UpdatePanel1.Update();
                    GridView2.DataBind();
                }
            }
        }
    }