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.CareersTypeListBLL careersTypeListBLL = new zlzw.BLL.CareersTypeListBLL(); zlzw.Model.CareersTypeListModel careersTypeListModel = careersTypeListBLL.GetModel(int.Parse(strSelectID)); careersTypeListModel.IsEnable = 0; careersTypeListBLL.Update(careersTypeListModel); CareersTypeList_BindGrid(); #endregion } else { return; } }
private void LoadData(string strType) { if (strType == "1") { string strID = Request.QueryString["value"];//操作ID zlzw.BLL.CareersTypeListBLL careersTypeListBLL = new zlzw.BLL.CareersTypeListBLL(); zlzw.Model.CareersTypeListModel careersTypeListModel = careersTypeListBLL.GetModel(int.Parse(strID)); txbCareersTypeName.Text = careersTypeListModel.CareersTypeName;//职位名称 if (careersTypeListModel.IsEnable == 1) { ckbIsEnable.Checked = true; } else { ckbIsEnable.Checked = false; } ViewState["PublishDate"] = careersTypeListModel.PublishDate.ToString(); ToolbarText2.Text = "编辑一个职位性质"; } btnClose.OnClientClick = ActiveWindow.GetConfirmHideReference(); }