Пример #1
0
        protected void linkBtnApply_Click(object sender, EventArgs e)
        {
            if (Request.Cookies["CurrentUserGUID"] == null)
            {
                linkBtnApply.Text = "用户尚未登陆";
                return;
            }
            else
            {
                if (!Check_UserType())
                {
                    FineUI.Alert.Show("当前账号不允许申请职位");
                    return;
                }
                zlzw.BLL.ResumeCollectionListBLL resumeCollectionListBLL = new zlzw.BLL.ResumeCollectionListBLL();
                System.Data.DataTable dt = resumeCollectionListBLL.GetList("ResumeGuid='"+ Request.QueryString["id"] +"' and EnterpriseGuid='"+ Request.QueryString["type"] +"' and EnterpriseIsDel=1 and IsEnable=1").Tables[0];
                if(dt.Rows.Count > 0)
                {
                    FineUI.Alert.Show("您已申请过该职位");
                    return;
                }

                zlzw.Model.ResumeCollectionListModel resumeCollectionListModel = new zlzw.Model.ResumeCollectionListModel();
                resumeCollectionListModel.EnterpriseGuid = new Guid(Request.QueryString["type"]);//企业GUID
                resumeCollectionListModel.ResumeGuid = new Guid(Request.QueryString["id"]);//职位ID
                resumeCollectionListModel.ResumeCollectionType = 1;//主投简历
                resumeCollectionListModel.EnterpriseIsDel = 1;//企业删除标记
                resumeCollectionListModel.IsEnable = 1;//管理员删除标记
                resumeCollectionListModel.PublishDate = DateTime.Now;//投递日期
                resumeCollectionListModel.Other01 = Request.Cookies["CurrentUserGUID"].Value;//投递人GUID
                resumeCollectionListBLL.Add(resumeCollectionListModel);
                FineUI.Alert.Show("职位申请成功");
            }
        }
        protected void imgBtnDownload_Click(object sender, ImageClickEventArgs e)
        {
            string strEnterpriseGUID = Get_EnterpriaseGUID(Request.Cookies["CurrentUserGUID"].Value);
            zlzw.Model.ResumeCollectionListModel resumeCollectionListModel = new zlzw.Model.ResumeCollectionListModel();
            resumeCollectionListModel.ResumeCollectionType = 0;//类型为企业简历收藏
            resumeCollectionListModel.ResumeGuid = new Guid(Request.QueryString["id"]);//当前简历GUID
            resumeCollectionListModel.EnterpriseGuid = new Guid(strEnterpriseGUID);//收藏企业的GUID
            resumeCollectionListModel.EnterpriseIsDel = 1;//企业标注为可显示
            resumeCollectionListModel.IsEnable = 1;
            resumeCollectionListModel.PublishDate = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"));

            #region 减去可下载简历数

            zlzw.BLL.GeneralEnterpriseBLL generalEnterpriseBLL = new zlzw.BLL.GeneralEnterpriseBLL();
            System.Data.DataTable dt = generalEnterpriseBLL.GetList("EnterpriseGuid='" + strEnterpriseGUID + "'").Tables[0];
            zlzw.Model.GeneralEnterpriseModel generalEnterpriseModel = generalEnterpriseBLL.GetModel(int.Parse(dt.Rows[0]["EnterpriseID"].ToString()));
            if (generalEnterpriseModel.DownloadResume < 1)
            {
                FineUI.Alert.Show("您剩余的简历下载数不足,请联系我们的客服人员");
                return;
            }
            generalEnterpriseModel.DownloadResume = generalEnterpriseModel.DownloadResume - 1;
            generalEnterpriseModel.CreateDate = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"));
            zlzw.BLL.ResumeCollectionListBLL resumeCollectionListBLL = new zlzw.BLL.ResumeCollectionListBLL();
            resumeCollectionListBLL.Add(resumeCollectionListModel);
            generalEnterpriseBLL.Update(generalEnterpriseModel);

            FineUI.Alert.Show("简历下载成功");

            #endregion

        }