コード例 #1
0
    protected void ddlOrganization_SelectedIndexChanged(object sender, EventArgs e)
    {
        try
        {
            if (ddlOrganization.SelectedIndex > 0)
            {
                this.ddlCommittee.DataSource     = BLLGroup.GetGroupListWithMember(int.Parse(this.ddlOrganization.SelectedValue), true, 'C');
                this.ddlCommittee.DataTextField  = "GroupName";
                this.ddlCommittee.DataValueField = "GroupID";
                this.ddlCommittee.DataBind();

                this.EnableCommittee      = true;
                this.ddlCommittee.Enabled = this.EnableCommittee;
            }
            else
            {
                this.EnableCommittee      = false;
                this.ddlCommittee.Enabled = this.EnableCommittee;
            }
        }
        catch (Exception ex)
        {
            this.lblStatusMessage.Text = "Error Status";
            this.lblStatusMessage.Text = ex.Message;
        }
    }
コード例 #2
0
 void LoadCommittee()
 {
     try
     {
         this.ddlCommittee.DataSource     = BLLGroup.GetGroupListWithMember(int.Parse(this.ddlOrganization.SelectedValue), true, 'C');
         this.ddlCommittee.DataTextField  = "GroupName";
         this.ddlCommittee.DataValueField = "GroupID";
         this.ddlCommittee.DataBind();
     }
     catch (Exception ex)
     {
         this.lblStatusMessage.Text = ex.Message;
         this.programmaticModalPopup.Show();
     }
 }
 void LoadGroup()
 {
     try
     {
         Session["Grouplst"]              = BLLGroup.GetGroupListWithMember(int.Parse(this.ddlOrg_Rqd.SelectedValue), false, 'C');
         this.lstCommittee.DataSource     = Session["GroupLst"];
         this.lstCommittee.DataTextField  = "GroupName";
         this.lstCommittee.DataValueField = "GroupID";
         this.lstCommittee.DataBind();
     }
     catch (Exception ex)
     {
         this.lblStatusMessage.Text = ex.Message;
         this.programmaticModalPopup.Show();
     }
 }
コード例 #4
0
    protected void ddlOrganization_SelectedIndexChanged(object sender, EventArgs e)
    {
        //if (this.ddlOrganization.SelectedIndex <= 0)
        //{
        //    return;
        //}

        try
        {
            this.ddlCommittee.DataSource     = BLLGroup.GetGroupListWithMember(int.Parse(this.ddlOrganization.SelectedValue), true, 'C');
            this.ddlCommittee.DataTextField  = "GroupName";
            this.ddlCommittee.DataValueField = "GroupID";
            this.ddlCommittee.DataBind();
        }
        catch (Exception ex)
        {
            this.lblStatusMessage.Text = "Error Status";
            this.lblStatusMessage.Text = ex.Message;
        }
    }
コード例 #5
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        try
        {
            if (this.ddlOrg.SelectedIndex <= 0)
            {
                this.lblStatusMessage.Text = "Please select organization from list.";
                this.programmaticModalPopup.Show();
                return;
            }

            ATTGroup obj = new ATTGroup();

            obj.OrgID       = int.Parse(this.ddlOrg.SelectedValue);
            obj.GroupID     = 0;
            obj.GroupName   = this.txtCommittee.Text.Trim();
            obj.Description = this.txtDescription.Text.Trim();
            obj.Active      = (this.chkActive.Checked == true) ? "Y" : "N";
            obj.Type        = 'C';

            ObjectValidation result = BLLGroup.Validate(obj);
            if (result.IsValid == false)
            {
                this.lblStatusMessage.Text = result.ErrorMessage;
                this.programmaticModalPopup.Show();
                return;
            }

            if (this.lstCommittee.SelectedIndex < 0)
            {
                obj.Action = "A";
            }
            else
            {
                obj.GroupID = int.Parse(this.lstCommittee.SelectedValue);
                obj.Action  = "E";
            }

            BLLGroup.AddGroup(obj);
            if (obj.Action == "A")
            {
                ((List <ATTGroup>)Session["GroupLst"]).Add(obj);
            }
            else
            {
                ((List <ATTGroup>)Session["GroupLst"])[this.lstCommittee.SelectedIndex] = obj;
            }

            Session["Grouplst"]              = BLLGroup.GetGroupList(int.Parse(this.ddlOrg.SelectedValue), false, 'C');
            this.lstCommittee.DataSource     = Session["GroupLst"];
            this.lstCommittee.DataTextField  = "GroupName";
            this.lstCommittee.DataValueField = "GroupID";
            this.lstCommittee.DataBind();

            this.ClearME();

            this.lblStatusMessage.Text = "Committee successfully saved.";
            this.programmaticModalPopup.Show();
        }
        catch (Exception ex)
        {
            this.lblStatusMessage.Text = ex.Message;
            this.programmaticModalPopup.Show();
        }
    }