Exemplo n.º 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.CareersListBLL careersListBLL = new zlzw.BLL.CareersListBLL();
                DataTable dt = careersListBLL.GetList("CareersGUID='" + strSelectID + "'").Tables[0];
                zlzw.Model.CareersListModal careersListModel = careersListBLL.GetModel(int.Parse(dt.Rows[0]["CareersID"].ToString()));
                careersListModel.IsEnable = 0;
                careersListBLL.Update(careersListModel);
                CareersTypeList_BindGrid();

                #endregion
            }
            else
            {
                return;
            }
        }
Exemplo n.º 2
0
        protected void btnSaveRefresh_Click(object sender, EventArgs e)
        {
            if (Request.QueryString["Type"] == "1")
            {
                //编辑保存
                zlzw.Model.CareersListModal careersListModal = new zlzw.Model.CareersListModal();
                careersListModal.DictionaryKey    = drpStoreType.SelectedValue;      //所属门店
                careersListModal.DepartmentName   = txbDepartmentName.Text;          //招聘部门
                careersListModal.CareersTitle     = txbCareersTitle.Text;            //职位名称
                careersListModal.CareersCount     = int.Parse(txbCareersCount.Text); //招聘人数
                careersListModal.WorkAdd          = txbWorkAdd.Text;                 //工作地点
                careersListModal.Educational      = txbEducational.Text;             //学历要求
                careersListModal.Salary           = txbSalary.Text;                  //月薪
                careersListModal.WorkExperience   = txbWorkExperience.Text;          //工作经验
                careersListModal.EMail            = txbEmail.Text;                   //联系邮件
                careersListModal.Telephone        = txbTel.Text;                     //联系电话
                careersListModal.ContactMan       = txbContactMan.Text;              //联系人
                careersListModal.Responsibilities = txbResponsibilities.Text;        //岗位职责
                careersListModal.Qualifications   = txbQualifications.Text;          //任职资格

                if (ckbIsHot.Checked)
                {
                    careersListModal.IsHot = 1;
                }
                else
                {
                    careersListModal.IsHot = 0;
                }
                careersListModal.IsEnable    = 1;
                careersListModal.CareersGUID = new Guid(Request.QueryString["value"]);
                careersListModal.PublishDate = DateTime.Parse(ViewState["PublishDate"].ToString());
                careersListModal.CareersID   = int.Parse(Get_CareersID(Request.QueryString["value"]));
                zlzw.BLL.CareersListBLL careersListBLL = new zlzw.BLL.CareersListBLL();
                careersListBLL.Update(careersListModal);
            }
            else
            {
                //添加保存

                zlzw.Model.CareersListModal careersListModal = new zlzw.Model.CareersListModal();
                careersListModal.DictionaryKey    = drpStoreType.SelectedValue;      //所属门店
                careersListModal.DepartmentName   = txbDepartmentName.Text;          //招聘部门
                careersListModal.CareersTitle     = txbCareersTitle.Text;            //职位名称
                careersListModal.CareersCount     = int.Parse(txbCareersCount.Text); //招聘人数
                careersListModal.WorkAdd          = txbWorkAdd.Text;                 //工作地点
                careersListModal.Educational      = txbEducational.Text;             //学历要求
                careersListModal.Salary           = txbSalary.Text;                  //月薪
                careersListModal.WorkExperience   = txbWorkExperience.Text;          //工作经验
                careersListModal.EMail            = txbEmail.Text;                   //联系邮件
                careersListModal.Telephone        = txbTel.Text;                     //联系电话
                careersListModal.ContactMan       = txbContactMan.Text;              //联系人
                careersListModal.Responsibilities = txbResponsibilities.Text;        //岗位职责
                careersListModal.Qualifications   = txbQualifications.Text;          //任职资格
                careersListModal.CareersGUID      = Guid.NewGuid();                  //创建GUID
                careersListModal.IsEnable         = 1;

                if (ckbIsHot.Checked)
                {
                    careersListModal.IsHot = 1;
                }
                else
                {
                    careersListModal.IsHot = 0;
                }

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

                zlzw.BLL.CareersListBLL careersListBLL = new zlzw.BLL.CareersListBLL();
                careersListBLL.Add(careersListModal);
            }

            // 2. Close this window and Refresh parent window
            PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
        }