Exemple #1
0
    protected void grdFeeHeads_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        int feeHeadID = Convert.ToInt32(grdFeeHeads.DataKeys[e.RowIndex].Value.ToString());

        if (feeHeadID != 0)
        {
            TMSFeesHeadMaster objFeeHead = TMSFeesHeadMaster.Get(feeHeadID);
            objFeeHead.IsDelete = true;
            objFeeHead.Update();
        }

        grdFeeHeads.EditIndex = -1;
        BindFeeHeads();
    }
Exemple #2
0
    protected void grdFeeHeads_UpdateRow(object sendedr, GridViewUpdateEventArgs e)
    {
        int         feeHeadID = Convert.ToInt32(grdFeeHeads.DataKeys[e.RowIndex].Value.ToString());
        GridViewRow row       = grdFeeHeads.Rows[e.RowIndex] as GridViewRow;

        if (feeHeadID != 0)
        {
            TMSFeesHeadMaster objFeeHead = TMSFeesHeadMaster.Get(feeHeadID);
            objFeeHead.FeeHeadName   = (row.FindControl("txtFeeHeadName") as TextBox).Text;
            objFeeHead.FeeCategoryID = Convert.ToInt32((row.FindControl("drpFeeCategoryName") as DropDownList).SelectedValue);
            objFeeHead.Update();
        }

        grdFeeHeads.EditIndex = -1;
        BindFeeHeads();
    }