protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (ValidateCourtFee() == false)
        {
            return;
        }

        List <ATTCourtFee> CourtFeeLST = new List <ATTCourtFee>();
        double?            ToAmount;

        foreach (GridViewRow gvRow in this.grdCourtFee.Rows)
        {
            ATTCourtFee objCourtFee = new ATTCourtFee();
            objCourtFee.FromAmount = double.Parse(((TextBox)gvRow.FindControl("txtFromAmount")).Text);
            if (((TextBox)gvRow.FindControl("txtAmountTo")).Text == "")
            {
                ToAmount = null;
            }
            else
            {
                ToAmount = double.Parse(((TextBox)gvRow.FindControl("txtAmountTo")).Text);
            }
            objCourtFee.ToAmount   = ToAmount;
            objCourtFee.AmtPer     = double.Parse(((TextBox)gvRow.FindControl("txtFee")).Text);
            objCourtFee.AmtPerType = ((DropDownList)gvRow.FindControl("ddlAmtPerType")).SelectedValue;//)?0: ((TextBox)gvRow.FindControl("ddlAmtPerType")).Text;
            objCourtFee.EntryBy    = "manoz";
            CourtFeeLST.Add(objCourtFee);
        }

        if (BLLCourtFee.SaveCourtFee(CourtFeeLST))
        {
            LoadCourtFee();
        }
    }
    void LoadCourtFee()
    {
        Session["CourtFee"] = BLLCourtFee.GetCourtFee(0);
        List <ATTCourtFee> CourtFeeLST = (List <ATTCourtFee>)Session["CourtFee"];

        this.grdCourtFee.DataSource = CourtFeeLST;
        this.grdCourtFee.DataBind();
    }