Esempio n. 1
0
 private void Approve(string entry)
 {
     try
     {
         bool publish;
         publish = btnApprove.Text.Equals("Approve") ? true : false;
         if (publish)
         {
             if (PhotoGallery.ChangeStatus(Convert.ToInt32(entry), "P"))
             {
                 lblMessage.Text = "The content was succesfully published.";
             }
             else
             {
                 lblMessage.Text = "There was problem publishing the content.";
             }
         }
         else
         {
             if (PhotoGallery.ChangeStatus(Convert.ToInt32(entry), "X"))
             {
                 lblMessage.Text = "The content was succesfully Suspended.";
             }
             else
             {
                 lblMessage.Text = "There was problem Suspending the content.";
             }
         }
     }
     catch { }
 }