protected void fvCommunication_PhoneNumber_ItemDeleting(object sender, FormViewDeleteEventArgs e) { if (WACGlobal_Methods.Security_UserCanPerformAction(Session["userID"], "D", "GlobalData", "GlobalData", "msgDelete")) { int iCode = 0; using (WACDataClassesDataContext wDataContext = new WACDataClassesDataContext()) { try { iCode = wDataContext.communication_delete(Convert.ToInt32(fvCommunication_PhoneNumber.DataKey.Value), Session["userName"].ToString()); if (iCode == 0) { lbCommunication_PhoneNumber_Close_Click(null, null); } else { WACAlert.Show("Error Returned from Database.", iCode); } } catch (Exception ex) { WACAlert.Show("Error: " + ex.Message, 0); } } } }