Ejemplo n.º 1
0
 protected void btnUpdate_Click(object sender, EventArgs e)
 {
     try
     {
         foreach (ListItem item in lstCommands.Items)
         {
             if (item.Selected && item.Value != "0")
             {
                 UserController.AddCommandToUserByPortalID(Convert.ToInt32(item.Value), userId, ConvertUtility.ToInt32(dropPortal.SelectedValue));
             }
             else
             {
                 UserController.RemoveCommandFromUserByPortalID(Convert.ToInt32(item.Value), userId, ConvertUtility.ToInt32(dropPortal.SelectedValue));
             }
         }
         lblUpdateStatus.Text = MiscUtility.MSG_UPDATE_SUCCESS;
         new DataCaching().RemoveAll();
     }
     catch (Exception ex)
     {
         Response.Write(ex.Message);
     }
     lblUpdateStatus1.Text = "";
 }