protected void btnDel_Click(object sender, EventArgs e) { if (grid1.SelectedRowIndexArray != null && grid1.SelectedRowIndexArray.Length > 0) { string strSelectID = "0"; for (int i = 0, count = grid1.SelectedRowIndexArray.Length; i < count; i++) { int rowIndex = grid1.SelectedRowIndexArray[i]; foreach (object key in grid1.DataKeys[rowIndex]) { strSelectID = key.ToString(); } } #region 除逻辑 zlzw.BLL.JobKindListBLL jobKindListBLL = new zlzw.BLL.JobKindListBLL(); zlzw.Model.JobKindListModel jobKindListModel = jobKindListBLL.GetModel(int.Parse(Get_JobCategoryID(strSelectID))); jobKindListModel.IsEnable = 0; jobKindListBLL.Update(jobKindListModel); JobKindList_BindGrid(); #endregion } else { return; } }
private void LoadData(string strType) { if (strType == "1") { string strID = Request.QueryString["value"];//操作ID zlzw.BLL.JobKindListBLL jobKindListBLL = new zlzw.BLL.JobKindListBLL(); zlzw.Model.JobKindListModel jobKindListModel = jobKindListBLL.GetModel(int.Parse(Get_JobKindID(strID))); txbNJobKindName.Text = jobKindListModel.JobKindName; //岗位名称 drpJobCategory.SelectedValue = jobKindListModel.JobCategoryGUID.ToString(); //岗位类型名称 if (jobKindListModel.IsHot == 1) { ckbIsHot.Checked = true; } else { ckbIsHot.Checked = false; } if (jobKindListModel.IsShowDefaultPage == 1) { ckbIsShowDefaultPage.Checked = true; } else { ckbIsShowDefaultPage.Checked = false; } ViewState["PublishDate"] = jobKindListModel.PublishDate.ToString(); ViewState["JobKindGUID"] = jobKindListModel.JobKindGUID; ViewState["JobCategoryGUID"] = jobKindListModel.JobCategoryGUID;//岗位分类 ToolbarText2.Text = "编辑一个岗位"; } btnClose.OnClientClick = ActiveWindow.GetConfirmHideReference(); }