protected void fvAg_WFP3_Modification_ItemInserting(object sender, FormViewInsertEventArgs e)
    {
        int?     i     = null;
        int      iCode = 0;
        FormView fv    = fvAg_WFP3_Modification;

        DropDownList ddlBMP   = fv.FindControl("ddlBMP") as DropDownList;
        TextBox      tbAmount = fv.FindControl("tbAmount") as TextBox;
        TextBox      tbNote   = fv.FindControl("tbNote") as TextBox;

        StringBuilder sb = new StringBuilder();

        using (WACDataClassesDataContext wDataContext = new WACDataClassesDataContext())
        {
            try
            {
                int?iBMP = null;
                if (!string.IsNullOrEmpty(ddlBMP.SelectedValue))
                {
                    iBMP = Convert.ToInt32(ddlBMP.SelectedValue);
                }
                else
                {
                    sb.Append("BMP is required. ");
                }

                decimal?dAmount = null;
                try { dAmount = Convert.ToDecimal(tbAmount.Text); }
                catch { sb.Append("Amount is required. Amount is a number (Decimal). "); }

                string sNote = WACGlobal_Methods.Format_Global_StringLengthRestriction(tbNote.Text, 255);

                if (string.IsNullOrEmpty(sb.ToString()))
                {
                    iCode = wDataContext.form_wfp3_modification_add(FK_Wfp3, iBMP, dAmount, sNote, Session["userName"].ToString(), ref i);
                    if (iCode != 0)
                    {
                        WACAlert.Show("Error Returned from Database. " + sb.ToString(), iCode);
                    }
                    else
                    {
                        PK_Wfp3Mod = Convert.ToInt32(i);
                    }
                }
                else
                {
                    WACAlert.Show(sb.ToString(), 0);
                }
            }
            catch (Exception ex) { WACAlert.Show(ex.Message, 0); }
        }
    }