Пример #1
0
        private string Get_JobCategoryID(string strJobCategoryGUID)
        {
            zlzw.BLL.JobCategoryListBLL jobCategoryListBLL = new zlzw.BLL.JobCategoryListBLL();
            DataTable dt = jobCategoryListBLL.GetList("JobCategoryGUID='" + strJobCategoryGUID + "'").Tables[0];

            return(dt.Rows[0]["JobCategoryID"].ToString());
        }
Пример #2
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;
            }
        }
Пример #3
0
        private void JobCategoryList_BindGrid()
        {
            zlzw.BLL.JobCategoryListBLL jobCategoryListBLL = new zlzw.BLL.JobCategoryListBLL();
            DataTable dt = jobCategoryListBLL.GetList(grid1.PageSize, grid1.PageIndex + 1, "*", "PublishDate", 0, "desc", "IsEnable=1").Tables[0];

            grid1.DataSource = dt;
            grid1.DataBind();
        }
Пример #4
0
        private void Load_JobCategoryList()
        {
            zlzw.BLL.JobCategoryListBLL jobCategoryListBLL = new zlzw.BLL.JobCategoryListBLL();
            DataTable dt = jobCategoryListBLL.GetList("IsEnable=1").Tables[0];

            drpJobCategory.DataTextField  = "JobCategoryName";
            drpJobCategory.DataValueField = "JobCategoryGUID";

            drpJobCategory.DataSource = dt;
            drpJobCategory.DataBind();
        }
Пример #5
0
        private string Get_JobCategoryName(string strJobCategoryGUID)
        {
            zlzw.BLL.JobCategoryListBLL jobCategoryListBLL = new zlzw.BLL.JobCategoryListBLL();
            DataTable dt = jobCategoryListBLL.GetList("JobCategoryGUID='" + strJobCategoryGUID + "'").Tables[0];

            if (dt.Rows.Count > 0)
            {
                return(dt.Rows[0]["JobCategoryName"].ToString());
            }
            else
            {
                return("未知");
            }
        }
Пример #6
0
        /// <summary>
        /// 获取总页数
        /// </summary>
        /// <returns></returns>
        private int Get_JobCategoryListTotalCount()
        {
            zlzw.BLL.JobCategoryListBLL jobCategoryListBLL = new zlzw.BLL.JobCategoryListBLL();
            DataTable dt = jobCategoryListBLL.GetList("IsEnable=1").Tables[0];

            if (dt.Rows.Count > 0)
            {
                return(dt.Rows.Count);
            }
            else
            {
                return(0);
            }
        }
        protected void btnSaveRefresh_Click(object sender, EventArgs e)
        {
            if (Request.QueryString["Type"] == "1")
            {
                //编辑保存
                zlzw.Model.JobCategoryListModal jobCategoryListModal = new zlzw.Model.JobCategoryListModal();
                jobCategoryListModal.JobCategoryName = txbJobCategoryName.Text;
                jobCategoryListModal.JobCategoryGUID = new Guid(ViewState["JobCategoryGUID"].ToString());
                jobCategoryListModal.IsEnable        = 1;
                if (ckbIsHot.Checked)
                {
                    jobCategoryListModal.IsHot = 1;
                }
                else
                {
                    jobCategoryListModal.IsHot = 0;
                }
                jobCategoryListModal.PublishDate   = DateTime.Parse(ViewState["PublishDate"].ToString());
                jobCategoryListModal.JobCategoryID = int.Parse(Get_JobCategoryID(Request.QueryString["value"]));
                zlzw.BLL.JobCategoryListBLL jobCategoryListBLL = new zlzw.BLL.JobCategoryListBLL();
                jobCategoryListBLL.Update(jobCategoryListModal);
            }
            else
            {
                //添加保存

                zlzw.Model.JobCategoryListModal jobCategoryListModal = new zlzw.Model.JobCategoryListModal();
                jobCategoryListModal.JobCategoryName = txbJobCategoryName.Text;
                jobCategoryListModal.JobCategoryGUID = Guid.NewGuid();
                jobCategoryListModal.IsEnable        = 1;
                if (ckbIsHot.Checked)
                {
                    jobCategoryListModal.IsHot = 1;
                }
                else
                {
                    jobCategoryListModal.IsHot = 0;
                }

                jobCategoryListModal.PublishDate = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"));

                zlzw.BLL.JobCategoryListBLL jobCategoryListBLL = new zlzw.BLL.JobCategoryListBLL();
                jobCategoryListBLL.Add(jobCategoryListModal);
            }

            // 2. Close this window and Refresh parent window
            PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
        }
 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();
 }