protected void gvShippingMethods_RowCommand(object sender, GridViewCommandEventArgs e) { try { if (e.CommandName == "EditMethod") { hfCurrentID.Value = e.CommandArgument.ToString(); ucEditShippingMethod.Popup(e.CommandArgument.ToString()); } else if (e.CommandName == "ToggleMethod") { hfCurrentID.Value = e.CommandArgument.ToString(); SettingsDAL settingsDAL = new SettingsDAL(); if (((LinkButton)e.CommandSource).Text == "Inactive") { settingsDAL.ToggleShippingMethod(int.Parse(e.CommandArgument.ToString()), true); } else { settingsDAL.ToggleShippingMethod(int.Parse(e.CommandArgument.ToString()), false); } BindShippingMethods(); } } catch (Exception ex) { string strErrCode = ERROR_DISPLAY_MESSAGE + "," + (new Error_Log()).LogErrorIntoDB(ex, "gvShippingMethods_RowCommand"); lblErr.Text = strErrCode; } }