protected void fvAg_WFP3_Bid_ItemDeleting(object sender, FormViewDeleteEventArgs e) { if (WACGlobal_Methods.Security_UserCanPerformAction(Session["userID"], "D", "A", "form_wfp3_bid", "msgDelete")) { FormView fv = fvAg_WFP3_Bid; int iCode = 0; using (WACDataClassesDataContext wDataContext = new WACDataClassesDataContext()) { try { iCode = wDataContext.form_wfp3_bid_delete(Convert.ToInt32(fv.DataKey.Value), Session["userName"].ToString()); if (iCode != 0) { WACAlert.Show("Error Returned from Database.", iCode); } } catch (Exception ex) { WACAlert.Show(ex.Message, 0); } } } }