Пример #1
0
        protected void btn_Submit_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                objVolunteer.VolunteerID = Request.QueryString["volunteerid"];

                if (dd_Coordinator.SelectedIndex != 0)
                {
                    objVolunteer.coordinatorID = dd_Coordinator.SelectedValue;
                }

                int errorCode = objVolunteer.update();
                if (errorCode == 0)
                {
                    lblMessage.Text = "Updated";
                }
                else if (errorCode == -2)
                {
                    lblMessage.Text      = "Fail";
                    lblMessage.ForeColor = System.Drawing.Color.Red;
                }
            }
        }