using BLL; using NPOI.SS.Formula.Functions; using System; using System.Collections.Generic; using System.Configuration; using System.Data; using System.Data.SqlClient; using System.Linq; using System.Text; using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.HSSE.HiddenInspection { public partial class HiddenRectificationList : PageBase { #region 定义项 /// /// GV被选择项列表 /// public List ItemSelectedList { get { return (List)ViewState["ItemSelectedList"]; } set { ViewState["ItemSelectedList"] = value; } } #endregion #region 加载页面 /// /// 加载页面 /// /// /// protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Funs.DropDownPageSize(this.ddlPageSize); GetButtonPower(); this.ItemSelectedList = new List(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); this.drpStates.DataValueField = "Id"; this.drpStates.DataTextField = "Name"; List handleSteps = new List(); Model.HandleStep handleStep1 = new Model.HandleStep(); handleStep1.Id = "1"; handleStep1.Name = "未整改"; handleSteps.Add(handleStep1); Model.HandleStep handleStep2 = new Model.HandleStep(); handleStep2.Id = "2"; handleStep2.Name = "按时整改"; handleSteps.Add(handleStep2); Model.HandleStep handleStep3 = new Model.HandleStep(); handleStep3.Id = "3"; handleStep3.Name = "超期整改"; handleSteps.Add(handleStep3); Model.HandleStep handleStep4 = new Model.HandleStep(); handleStep4.Id = "4"; handleStep4.Name = "超期未整改"; handleSteps.Add(handleStep4); Model.HandleStep handleStep5 = new Model.HandleStep(); handleStep5.Id = "-1"; handleStep5.Name = "作废"; handleSteps.Add(handleStep5); this.drpStates.DataSource = handleSteps; ; this.drpStates.DataBind(); this.drpStates.SelectedValue = "1"; ListItem[] ProblemTypes = new ListItem[2]; ProblemTypes[0] = new ListItem("日常巡检", "1"); ProblemTypes[1] = new ListItem("专项巡检", "2"); this.drpProblemTypes.DataValueField = "Value"; this.drpProblemTypes.DataTextField = "Text"; this.drpProblemTypes.DataSource = ProblemTypes; this.drpProblemTypes.DataBind(); Funs.FineUIPleaseSelect(this.drpProblemTypes, "按检查类型"); // 绑定表格 BindGrid(); } } /// /// 绑定数据 /// private void BindGrid() { string strSql = "SELECT * FROM View_Hazard_HazardRegister WHERE ProblemTypes ='1' "; //ProblemTypes in ('1' ,'2') List listStr = new List(); if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) { strSql += " AND ProjectId = @ProjectId"; listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); } if (!string.IsNullOrEmpty(this.txtCheckMan.Text.Trim())) { strSql += " AND CheckManName LIKE @CheckMan"; listStr.Add(new SqlParameter("@CheckMan", "%" + this.txtCheckMan.Text.Trim() + "%")); } if (!string.IsNullOrEmpty(this.txtType.Text.Trim())) { strSql += " AND RegisterTypesName LIKE @Type"; listStr.Add(new SqlParameter("@Type", "%" + this.txtType.Text.Trim() + "%")); } if (!string.IsNullOrEmpty(this.txtWorkAreaName.Text.Trim())) { strSql += " AND WorkAreaName LIKE @WorkAreaName"; listStr.Add(new SqlParameter("@WorkAreaName", "%" + this.txtWorkAreaName.Text.Trim() + "%")); } if (!string.IsNullOrEmpty(this.dpRiskLevel.SelectedValue.Trim())) { if (this.dpRiskLevel.SelectedText == "重大") { strSql += " AND Risk_Level in('重大','3','高') "; } else if (this.dpRiskLevel.SelectedText == "较大") { strSql += " AND Risk_Level in('较大','2','较高') "; } else if (this.dpRiskLevel.SelectedText == "一般") { strSql += " AND Risk_Level in('一般','1','低') "; } } if (!string.IsNullOrEmpty(this.drpType.SelectedValue.Trim())) { strSql += " AND CheckCycle=@CheckCycle"; listStr.Add(new SqlParameter("@CheckCycle", this.drpType.SelectedValue)); } if (!string.IsNullOrEmpty(this.txtResponsibilityUnitName.Text.Trim())) { strSql += " AND ResponsibilityUnitName LIKE @ResponsibilityUnitName"; listStr.Add(new SqlParameter("@ResponsibilityUnitName", "%" + this.txtResponsibilityUnitName.Text.Trim() + "%")); } if (!string.IsNullOrEmpty(txtStartTime.Text.Trim())) { strSql += " AND CheckTime >= @StartTime"; listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text.Trim())); } if (!string.IsNullOrEmpty(this.txtEndTime.Text.Trim())) { strSql += " AND CheckTime < @EndTime"; DateTime endTime = DateTime.Parse(this.txtEndTime.Text).AddDays(1); listStr.Add(new SqlParameter("@EndTime", endTime.ToString("yyyy-MM-dd"))); } if (!string.IsNullOrEmpty(txtStartRectificationTime.Text.Trim())) { strSql += " AND RectificationTime >= @StartRectificationTime"; listStr.Add(new SqlParameter("@StartRectificationTime", this.txtStartRectificationTime.Text.Trim())); } if (!string.IsNullOrEmpty(this.txtEndRectificationTime.Text.Trim())) { strSql += " AND RectificationTime <= @EndRectificationTime"; DateTime endTime = DateTime.Parse(this.txtEndRectificationTime.Text).AddDays(1); listStr.Add(new SqlParameter("@EndRectificationTime", endTime.ToString("yyyy-MM-dd"))); } if (this.drpProblemTypes.SelectedValue != BLL.Const._Null) { strSql += " and ProblemTypes ='"+this.drpProblemTypes.SelectedValue+"' " ; } if (this.drpStates.SelectedValueArray != null && this.drpStates.SelectedValueArray.Length > 0) { string strSqlTemp = ""; if (this.drpStates.SelectedValueArray.Contains("1")) { strSqlTemp += " ( States = '1' and RectificationPeriod > getdate() ) OR"; } if (this.drpStates.SelectedValueArray.Contains("2")) { strSqlTemp += " ( States in( '2','3') and datediff(DAY,RectificationPeriod,RectificationTime)<=0 ) OR"; } if (this.drpStates.SelectedValueArray.Contains("3")) { strSqlTemp += " (States in( '2','3') and datediff(DAY,RectificationPeriod,RectificationTime)>0 ) OR"; } if (this.drpStates.SelectedValueArray.Contains("4")) { strSqlTemp += " ( States ='1' and RectificationPeriod < getdate() ) OR"; } if (this.drpStates.SelectedValueArray.Contains("-1")) { strSqlTemp += " States ='-1' OR"; } if (!string.IsNullOrEmpty(strSqlTemp)) { strSql += " and (" + strSqlTemp.TrimEnd('R').TrimEnd('O') + ") "; } } if (!CommonService.IsMainUnitOrAdmin(this.CurrUser.UserId)) { strSql += " AND (ResponsibleUnit =@ResponsibleUnit OR SendUnitId=@SendUnitId)"; listStr.Add(new SqlParameter("@ResponsibleUnit", this.CurrUser.UnitId)); listStr.Add(new SqlParameter("@SendUnitId", this.CurrUser.UnitId)); } SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); Grid1.RecordCount = tb.Rows.Count; var table = this.GetPagedDataTable(Grid1, tb); Grid1.DataSource = table; Grid1.DataBind(); for (int i = 0; i < Grid1.Rows.Count; i++) { string HazardRegisterId = Grid1.Rows[i].DataKeys[0].ToString(); Model.View_Hazard_HazardRegister registration = (from x in Funs.DB.View_Hazard_HazardRegister where x.HazardRegisterId == HazardRegisterId select x).FirstOrDefault(); if (registration != null) { if (registration.Risk_Level == "一般" || registration.Risk_Level == "1" || registration.Risk_Level == "低") { Grid1.Rows[i].RowCssClass = "Blue"; }else if (registration.Risk_Level == "较大" || registration.Risk_Level == "2" || registration.Risk_Level == "较高") { Grid1.Rows[i].RowCssClass = "Yellow"; } else if (registration.Risk_Level == "重大" || registration.Risk_Level == "3") { Grid1.Rows[i].RowCssClass = "Red"; } } } } #endregion #region 表排序、分页、关闭窗口 /// /// 分页 /// /// /// protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) { Grid1.PageIndex = e.NewPageIndex; BindGrid(); } /// /// 排序 /// /// /// protected void Grid1_Sort(object sender, GridSortEventArgs e) { BindGrid(); } /// /// 分页显示条数下拉框 /// /// /// protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) { Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); BindGrid(); } /// /// 关闭弹出窗 /// /// /// protected void Window1_Close(object sender, WindowCloseEventArgs e) { BindGrid(); } #endregion #region Grid双击事件 /// /// Grid行双击事件 /// /// /// protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) { btnMenuSee_Click(null, null); } #endregion #region 查看 /// /// 查看按钮 /// /// /// protected void btnMenuSee_Click(object sender, EventArgs e) { if (Grid1.SelectedRowIndexArray.Length == 0) { Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); return; } string RegistrationId = Grid1.SelectedRowID; var registration = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByHazardRegisterId(RegistrationId); if (registration != null) { PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HiddenRectificationView.aspx?HazardRegisterId={0}", RegistrationId, "查看 - "))); } } #endregion #region 编辑 /// /// 编辑按钮 /// /// /// protected void btnMenuModify_Click(object sender, EventArgs e) { if (Grid1.SelectedRowIndexArray.Length == 0) { Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); return; } string RegistrationId = Grid1.SelectedRowID; var registration = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByHazardRegisterId(RegistrationId); if (registration != null) { if (registration.States == Const.State_1) //待整改 { if (registration.CheckManId == this.CurrUser.UserId) //当前人是检查人,可以在整改前继续编辑 { PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HiddenRectificationAdd.aspx?HazardRegisterId={0}", RegistrationId, "编辑 - "))); } else { Alert.ShowInTop("您不是记录检查人,无法编辑!", MessageBoxIcon.Warning); return; } } else if (registration.States == Const.State_2) //已整改待确认 { if (registration.ResponsibleMan == this.CurrUser.UserId) //当前人是责任人,可以在确认前继续编辑 { PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HiddenRectificationRectify.aspx?HazardRegisterId={0}", RegistrationId, "编辑 - "))); } else { Alert.ShowInTop("您不是记录责任人,无法编辑!", MessageBoxIcon.Warning); return; } } else if (registration.States == Const.State_3) //已闭环 { Alert.ShowInTop("该记录已闭环,无法编辑!", MessageBoxIcon.Warning); return; } } } #endregion #region 整改 /// /// 整改按钮 /// /// /// protected void btnMenuRectify_Click(object sender, EventArgs e) { if (Grid1.SelectedRowIndexArray.Length == 0) { Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); return; } string RegistrationId = Grid1.SelectedRowID; var registration = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByHazardRegisterId(RegistrationId); if (registration != null) { if (registration.States == "1") //待整改 { if (registration.ResponsibleMan == this.CurrUser.UserId) //当前人是责任人,可以进行整改操作 { PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HiddenRectificationRectify.aspx?HazardRegisterId={0}", RegistrationId, "编辑 - "))); } else { Alert.ShowInTop("您不是记录责任人,无法整改!", MessageBoxIcon.Warning); return; } } else { Alert.ShowInTop("该记录不是待整改状态,无法进行整改操作!", MessageBoxIcon.Warning); return; } } } #endregion #region 确认 /// /// 确认按钮 /// /// /// protected void btnMenuConfirm_Click(object sender, EventArgs e) { if (Grid1.SelectedRowIndexArray.Length == 0) { Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); return; } string RegistrationId = Grid1.SelectedRowID; var registration = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByHazardRegisterId(RegistrationId); if (registration != null) { if (registration.States == Const.State_2) //待确认 { if (registration.CheckManId == this.CurrUser.UserId) //当前人是检查人,可以进行确认操作 { PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HiddenRectificationConfirm.aspx?HazardRegisterId={0}", RegistrationId, "编辑 - "))); } else { Alert.ShowInTop("您不是记录检查人,无法确认!", MessageBoxIcon.Warning); return; } } else { Alert.ShowInTop("该记录不是待确认状态,无法进行确认操作!", MessageBoxIcon.Warning); return; } } } #endregion #region 编制 /// /// 编制 /// /// /// protected void btnNew_Click(object sender, EventArgs e) { if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HSSE_HiddenRectificationListMenuId, BLL.Const.BtnAdd)) { PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HiddenRectificationAdd.aspx", "登记 - "))); } else { Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); return; } } #endregion #region Grid行点击事件 /// /// Grid行点击事件 /// /// protected void Grid1_RowCommand(object sender, GridCommandEventArgs e) { string RegistrationId = Grid1.DataKeys[e.RowIndex][0].ToString(); Model.HSSE_Hazard_HazardRegister hazardRegister = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByHazardRegisterId(RegistrationId); if (e.CommandName == "IsSelected") { CheckBoxField checkField = (CheckBoxField)Grid1.FindColumn("ckbIsSelected"); if (checkField.GetCheckedState(e.RowIndex)) { if (!ItemSelectedList.Contains(RegistrationId)) { ItemSelectedList.Add(RegistrationId); } } else { if (ItemSelectedList.Contains(RegistrationId)) { ItemSelectedList.Remove(RegistrationId); } } } if (e.CommandName == "del") { if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HSSE_HiddenRectificationListMenuId, BLL.Const.BtnDelete)) { if (hazardRegister.States != Const.State_3 || this.CurrUser.UserId == BLL.Const.hfnbdId) //待整改 { var getD = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByHazardRegisterId(RegistrationId); if (getD != null) { BLL.LogService.AddSys_Log(this.CurrUser, getD.HazardCode, getD.HazardRegisterId, BLL.Const.HSSE_HiddenRectificationListMenuId, BLL.Const.BtnDelete); BLL.HSSE_Hazard_HazardRegisterService.DeleteHazardRegisterByHazardRegisterId(RegistrationId); BindGrid(); ShowNotify("删除成功!", MessageBoxIcon.Success); } } else { Alert.ShowInTop("已闭环,无法删除!", MessageBoxIcon.Warning); return; } } else { Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); return; } } } #endregion #region 删除 /// /// 右键删除事件 /// /// /// protected void btnMenuDelete_Click(object sender, EventArgs e) { if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HSSE_HiddenRectificationListMenuId, BLL.Const.BtnDelete)) { if (Grid1.SelectedRowIndexArray.Length > 0) { foreach (int rowIndex in Grid1.SelectedRowIndexArray) { string rowID = Grid1.DataKeys[rowIndex][0].ToString(); var hazardRegister = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByHazardRegisterId(rowID); if (hazardRegister != null) { BLL.LogService.AddSys_Log(this.CurrUser, hazardRegister.HazardCode, hazardRegister.HazardRegisterId, BLL.Const.HSSE_HiddenRectificationListMenuId, BLL.Const.BtnDelete); BLL.HSSE_Hazard_HazardRegisterService.DeleteHazardRegisterByHazardRegisterId(rowID); } } BindGrid(); ShowNotify("删除成功!", MessageBoxIcon.Success); } } else { Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); return; } } #endregion #region 格式化字符串 /// /// 获取整改前图片 /// /// /// protected string ConvertImageUrl(object registrationId) { string url = string.Empty; if (registrationId != null) { var registration = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByHazardRegisterId(registrationId.ToString()); if (registration != null) { url = BLL.UploadAttachmentService.ShowAttachment("../../", registration.ImageUrl); } } return url; } protected string ConvertProblemTypes(object registrationId) { string url = string.Empty; if (registrationId != null) { if (registrationId.ToString() == "1") { return "日常巡检"; }else if (registrationId.ToString() == "2") { return "专项检查"; } } return url; } /// /// 获取整改前图片(放于Img中) /// /// /// protected string ConvertImageUrlByImage(object registrationId) { string url = string.Empty; if (registrationId != null) { var registration = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByHazardRegisterId(registrationId.ToString()); if (registration != null) { url = BLL.UploadAttachmentService.ShowImage(ConfigurationManager.AppSettings["SGGLUrl"], registration.ImageUrl); } } return url; } /// /// 获取整改后图片 /// /// /// protected string ConvertImgUrl(object registrationId) { string url = string.Empty; if (registrationId != null) { var registration = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByHazardRegisterId(registrationId.ToString()); if (registration != null) { url = BLL.UploadAttachmentService.ShowAttachment(ConfigurationManager.AppSettings["SGGLUrl"], registration.RectificationImageUrl); } } return url; } /// /// 获取整改后图片(放于Img中) /// /// /// protected string ConvertImgUrlByImage(object registrationId) { string url = string.Empty; if (registrationId != null) { var registration = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByHazardRegisterId(registrationId.ToString()); if (registration != null) { url = BLL.UploadAttachmentService.ShowImage(ConfigurationManager.AppSettings["SGGLUrl"], registration.RectificationImageUrl); } } return url; } protected string ConverState(object registrationId) { string state = string.Empty; if (registrationId != null) { Model.View_Hazard_HazardRegister registration = (from x in Funs.DB.View_Hazard_HazardRegister where x.HazardRegisterId == registrationId.ToString() select x).FirstOrDefault(); if (registration != null) { DateTime RectificationPeriod = DateTime.Parse(registration.RectificationPeriod.Value.ToString("yyyy-MM-dd")).AddDays(1); if (registration.States == "1" && RectificationPeriod > DateTime.Now) { state += "未整改"; } else if ((registration.States == "2" || registration.States == "3")&& RectificationPeriod > registration.RectificationTime.Value) { state += "按时整改"; } else if ((registration.States == "2" || registration.States == "3") && RectificationPeriod <= registration.RectificationTime.Value) { state += "超期整改"; } else if (registration.States =="1" && registration. RectificationPeriod.Value /// /// protected void btnOut_Click(object sender, EventArgs e) { Response.ClearContent(); string filename = Funs.GetNewFileName(); Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("日常巡检" + filename, System.Text.Encoding.UTF8) + ".xls"); Response.ContentType = "application/excel"; Response.ContentEncoding = System.Text.Encoding.UTF8; this.Grid1.PageSize = 100000; this.BindGrid(); Response.Write(GetGridTableHtml(Grid1)); Response.End(); } /// /// 导出方法 /// /// /// private string GetGridTableHtml(Grid grid) { StringBuilder sb = new StringBuilder(); sb.Append(""); sb.Append(""); sb.Append(""); foreach (GridColumn column in grid.Columns) { if (column.ColumnID != "ckbIsSelected" && column.ColumnID != "tfImageUrl1" && column.ColumnID != "lbImageUrl2" && column.ColumnID != "Punish" && column.ColumnID != "Del") { sb.AppendFormat("", column.HeaderText); }else if (column.ColumnID == "tfImageUrl1" || column.ColumnID == "lbImageUrl2") { sb.AppendFormat("", column.HeaderText); } } sb.Append(""); foreach (GridRow row in grid.Rows) { sb.Append(""); foreach (GridColumn column in grid.Columns) { if (column.ColumnID != "ckbIsSelected" && column.ColumnID != "Punish" && column.ColumnID != "Del") { string html = row.Values[column.ColumnIndex].ToString(); if (column.ColumnID == "tfPageIndex") { html = (row.FindControl("lblPageIndex") as AspNet.Label).Text; } if (column.ColumnID == "tfImageUrl1") { html = (row.FindControl("lbImageUrl1") as AspNet.Label).Text; } if (column.ColumnID == "tfImageUrl2") { html = (row.FindControl("lbImageUrl2") as AspNet.Label).Text; } if (column.ColumnID == "ProblemTypes") { html = (row.FindControl("lbProblemTypes") as AspNet.Label).Text; } if (column.ColumnID == "State") { html = (row.FindControl("Label1") as AspNet.Label).Text; } sb.AppendFormat("", html); } } sb.Append(""); } sb.Append("
{0}
{0}
{0}
"); return sb.ToString(); } #endregion #region 查询 /// /// 查询 /// /// /// protected void TextBox_TextChanged(object sender, EventArgs e) { if (!string.IsNullOrEmpty(this.txtStartRectificationTime.Text.Trim()) && !string.IsNullOrEmpty(this.txtEndRectificationTime.Text.Trim())) { if (Funs.GetNewDateTime(this.txtStartRectificationTime.Text.Trim()) > Funs.GetNewDateTime(this.txtEndRectificationTime.Text.Trim())) { Alert.ShowInTop("开始时间不能大于结束时间!", MessageBoxIcon.Warning); return; } } this.BindGrid(); } #endregion /// /// /// /// /// protected void Window3_Close(object sender, WindowCloseEventArgs e) { //if (!string.IsNullOrEmpty(this.hdRemark.Text)) //{ string hazardRegisterIds = string.Empty; foreach (var item in ItemSelectedList) { hazardRegisterIds += item + ","; } if (!string.IsNullOrEmpty(hazardRegisterIds)) { hazardRegisterIds = hazardRegisterIds.Substring(0, hazardRegisterIds.LastIndexOf(",")); } // PageContext.RegisterStartupScript(Window4.GetShowReference(String.Format("HiddenRectificationPrint.aspx?HazardRegisterIds={0}&CheckType={1}", hazardRegisterIds,"0", "查看 - "))); this.hdRemark.Text = string.Empty; //} } #region 获取按钮权限 /// /// 获取按钮权限 /// /// /// private void GetButtonPower() { if (Request.Params["value"] == "0") { return; } var buttonList = CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HSSE_HiddenRectificationListMenuId); if (buttonList.Count() > 0) { if (buttonList.Contains(Const.BtnAdd)) { this.btnNew.Hidden = false; this.btnRectify.Hidden = false; this.btnConfirm.Hidden = false; } if (buttonList.Contains(Const.BtnModify)) { this.btnModify.Hidden = false; } if (buttonList.Contains(Const.BtnDelete)) { this.btnMenuDelete.Hidden = false; } } } #endregion } }