示例#1
0
    protected void GridView_Grading_RowUpdating(object sender, GridViewUpdateEventArgs e)
    {
        int    ID         = UDFLib.ConvertToInteger(GridView_Grading.DataKeys[e.RowIndex].Value.ToString());
        string Grade_Name = e.NewValues["Grade_Name"].ToString();
        int    Grade_Type = UDFLib.ConvertToInteger(e.NewValues["Grade_Type"].ToString());
        int    Min        = UDFLib.ConvertToInteger(e.NewValues["Min"].ToString());
        int    Max        = UDFLib.ConvertToInteger(e.NewValues["Max"].ToString());

        if (Min >= Max)
        {
            string js = "alert('Max. point should not be equal or less than Min. Point!');";
            ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", js, true);
            return;
        }
        int Divisions = UDFLib.ConvertToInteger(e.NewValues["Divisions"].ToString());

        BLL_Crew_Evaluation.UPDATE_Grading(ID, Grade_Name, Grade_Type, Min, Max, Divisions, GetSessionUserID());
        GridView_Grading.EditIndex = -1;
        Load_GradingList();
    }