Exemplo n.º 1
0
        protected void deactivateLinkButton_Click(object sender, EventArgs e)
        {
            try
            {
                LinkButton lnkBtn = (LinkButton)sender;
                GridViewRow row = (GridViewRow)lnkBtn.NamingContainer;

                ProductBLL roduct = new ProductBLL();
                roduct.UpdateProductActivation(productListGridView.Rows[row.RowIndex].Cells[0].Text.ToString(), "False");

                productListGridView.Rows[row.RowIndex].Cells[5].Text = "False";
                string message = "Product <span class='actionTopic'>Deactivated</span> Successfully.";
                MyAlertBox("SuccessAlert(\"" + "Process Succeed" + "\", \"" + message + "\", \"\");");
            }
            catch (Exception ex)
            {
                string message = ex.Message;
                if (ex.InnerException != null) { message += " --> " + ex.InnerException.Message; }
                MyAlertBox("ErrorAlert(\"" + ex.GetType() + "\", \"" + message + "\", \"\");");
            }
        }