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

                CustomerBLL customer = new CustomerBLL();
                customer.UpdateCustomerActivation(customerListGridView.Rows[row.RowIndex].Cells[0].Text.ToString(), "False");

                customerListGridView.Rows[row.RowIndex].Cells[5].Text = "False";
                string message = "Customer <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 + "\", \"\");");
            }
        }