Exemple #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.PartnersJobListBLL     partnersJobListBLL   = new zlzw.BLL.PartnersJobListBLL();
                zlzw.Model.PartnersJobListModel partnersJobListModel = partnersJobListBLL.GetModel(int.Parse(strSelectID));
                partnersJobListModel.IsEnable = 0;
                partnersJobListBLL.Update(partnersJobListModel);
                PostList_BindGrid();

                #endregion
            }
            else
            {
                return;
            }
        }
Exemple #2
0
        protected void btnSaveRefresh_Click(object sender, EventArgs e)
        {
            if (Request.QueryString["Type"] == "1")
            {
                //编辑保存
                zlzw.Model.PartnersJobListModel partnersJobListModel = new zlzw.Model.PartnersJobListModel();
                partnersJobListModel.PartnerGUID       = new Guid(drpPartnerGUID.SelectedValue);
                partnersJobListModel.WorkAdd           = txbWorkAdd.Text;           //工作地点
                partnersJobListModel.PostInfo          = txbPostInfo.Text;          //招聘职位
                partnersJobListModel.RecruitmentNumber = txbRecruitmentNumber.Text; //招聘人数
                partnersJobListModel.PostDemand        = txbPostDemand.Text;        //岗位要求
                partnersJobListModel.TreatmentInfo     = txbTreatmentInfo.Text;     //待遇相关
                partnersJobListModel.OtherInfo         = txbOtherInfo.Text;         //备注信息
                partnersJobListModel.IsEnable          = 1;
                //if (ckbIsHot.Checked)
                //{
                //    partnersJobListModel.IsHot = 1;
                //}
                //else
                //{
                //    partnersJobListModel.IsHot = 0;
                //}
                partnersJobListModel.PublishDate   = DateTime.Parse(ViewState["PublishDate"].ToString());
                partnersJobListModel.PartnerGUID   = new Guid(ViewState["PartnerGUID"].ToString());
                partnersJobListModel.PartnersJobID = int.Parse(Request.QueryString["value"]);
                zlzw.BLL.PartnersJobListBLL partnersJobListBLL = new zlzw.BLL.PartnersJobListBLL();
                partnersJobListBLL.Update(partnersJobListModel);
            }
            else
            {
                //添加保存

                zlzw.Model.PartnersJobListModel partnersJobListModel = new zlzw.Model.PartnersJobListModel();
                partnersJobListModel.PartnerGUID       = new Guid(drpPartnerGUID.SelectedValue);
                partnersJobListModel.WorkAdd           = txbWorkAdd.Text;           //工作地点
                partnersJobListModel.PostInfo          = txbPostInfo.Text;          //招聘职位
                partnersJobListModel.RecruitmentNumber = txbRecruitmentNumber.Text; //招聘人数
                partnersJobListModel.PostDemand        = txbPostDemand.Text;        //岗位要求
                partnersJobListModel.TreatmentInfo     = txbTreatmentInfo.Text;     //待遇相关
                partnersJobListModel.OtherInfo         = txbOtherInfo.Text;         //备注信息
                partnersJobListModel.IsEnable          = 1;
                //if (ckbIsHot.Checked)
                //{
                //    partnersJobListModel.IsHot = 1;
                //}
                //else
                //{
                //    partnersJobListModel.IsHot = 0;
                //}
                partnersJobListModel.PublishDate = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"));
                zlzw.BLL.PartnersJobListBLL partnersJobListBLL = new zlzw.BLL.PartnersJobListBLL();
                partnersJobListBLL.Add(partnersJobListModel);
            }

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