protected void lnkBan_Click(object sender, EventArgs e) { var lnkbtn = sender as LinkButton; if (lnkbtn == null) { return; } Action = lnkbtn.CommandName; Code = lnkbtn.CommandArgument; var closeLink = (Control)sender; GridViewRow row = (GridViewRow)closeLink.NamingContainer; var hidSuspent = ((HiddenField)row.Cells[0].FindControl("hidSuspent")).Value.ToBool(); var queryArgument = new QueryArgument(UserContext.DataBaseInfo) { Key = Code, filter1 = hidSuspent ? "false" : "true", FilterKey = Constants.TableMaterials }; _controlPanel.Cancle(queryArgument); CustomMessageControl.MessageBodyText = GlobalCustomResource.MaterialSaved; CustomMessageControl.MessageBodyText = hidSuspent ? GlobalCustomResource.PartIncluded : GlobalCustomResource.PartSuspended; CustomMessageControl.MessageType = MessageTypes.Success; CustomMessageControl.ShowMessage(); AuditLog.LogEvent(UserContext, SysEventType.INFO, hidSuspent ? "Part Included" : "Part Suspended", hidSuspent ? GlobalCustomResource.PartIncluded : GlobalCustomResource.PartSuspended, true); Code = string.Empty; BindData(BindType.List); }