Ejemplo n.º 1
0
 protected void lbVenue_EventVenueType_Delete_Click(object sender, EventArgs e)
 {
     if (WACGlobal_Methods.Security_UserCanPerformAction(Session["userID"], "D", "GlobalData", "GlobalData", "msgDelete"))
     {
         LinkButton lb    = (LinkButton)sender;
         int        i     = Convert.ToInt32(lb.CommandArgument);
         int        iCode = 0;
         using (WACDataClassesDataContext wDataContext = new WACDataClassesDataContext())
         {
             try
             {
                 iCode = wDataContext.eventVenueType_delete(i);
                 if (iCode == 0)
                 {
                     BindVenue(Convert.ToInt32(fvVenue.DataKey.Value));
                 }
                 else
                 {
                     WACAlert.Show("Error Returned from Database.", iCode);
                 }
             }
             catch (Exception ex) { WACAlert.Show(ex.Message, 0); }
         }
     }
 }