コード例 #1
0
    protected void btnSaveGrade_Click(object sender, EventArgs e)
    {
        if (ValidateGrade())
        {
            int ID = BLL_Crew_Evaluation.INSERT_Grading(txtGrade.Text.Trim(), UDFLib.ConvertToInteger(rdoGradeType.SelectedValue), UDFLib.ConvertToInteger(ddlMin.SelectedValue), UDFLib.ConvertToInteger(ddlMax.SelectedValue), UDFLib.ConvertToInteger(ddlDivisions.SelectedValue), GetSessionUserID());

            txtGrade.Text = "";
            for (int i = 0; i < rptOptions.Items.Count; i++)
            {
                TextBox txtValue = (TextBox)rptOptions.Items[i].FindControl("txtValue");
                TextBox txtText  = (TextBox)rptOptions.Items[i].FindControl("txtText");

                if (txtText != null && txtValue != null)
                {
                    BLL_Crew_Evaluation.INSERT_GradingOption(ID, txtText.Text.Trim(), UDFLib.ConvertToDecimal(txtValue.Text), GetSessionUserID());
                }
            }
            Load_GradingList();
        }
    }