예제 #1
0
        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.JobCategoryListBLL     jobCategoryListBLL   = new zlzw.BLL.JobCategoryListBLL();
                zlzw.Model.JobCategoryListModal jobCategoryListModal = jobCategoryListBLL.GetModel(int.Parse(Get_JobCategoryID(strSelectID)));

                jobCategoryListModal.IsEnable = 0;
                jobCategoryListBLL.Update(jobCategoryListModal);
                JobCategoryList_BindGrid();

                #endregion
            }
            else
            {
                return;
            }
        }
 private void LoadData(string strType)
 {
     if (strType == "1")
     {
         string strID = Request.QueryString["value"];//操作ID
         zlzw.BLL.JobCategoryListBLL     jobCategoryListBLL   = new zlzw.BLL.JobCategoryListBLL();
         zlzw.Model.JobCategoryListModal jobCategoryListModal = jobCategoryListBLL.GetModel(int.Parse(Get_JobCategoryID(strID)));
         txbJobCategoryName.Text      = jobCategoryListModal.JobCategoryName;//岗位名称
         ViewState["PublishDate"]     = jobCategoryListModal.PublishDate.ToString();
         ViewState["JobCategoryGUID"] = jobCategoryListModal.JobCategoryGUID.ToString();
         if (jobCategoryListModal.IsHot == 1)
         {
             ckbIsHot.Checked = true;
         }
         else
         {
             ckbIsHot.Checked = false;
         }
         ToolbarText2.Text = "编辑一个岗位类型";
     }
     btnClose.OnClientClick = ActiveWindow.GetConfirmHideReference();
 }