Пример #1
0
        public void ApplyJob(EntitiesModel.ApplyJob model)
        {
            if (model == null)
            {
                AjaxHelps.WriteErrorJson("申请失败");
                return;
            }

            model.Date   = DateTime.Now;
            model.Status = 0;
            Bll.ApplyJobBll bll      = new Bll.ApplyJobBll();
            int             applyNum = bll.GetUserApplyNum(model.Uid, 0); //用户已申请的简历数

            if (applyNum == 5 || applyNum > 5)
            {
                AjaxHelps.WriteErrorJson("用户最只能投递5份简历");
                return;
            }
            if (bll.AddResume(model))
            {
                AjaxHelps.WriteSucessJson("申请成功");
            }
            else
            {
                AjaxHelps.WriteErrorJson("申请失败");
            }
        }
Пример #2
0
 /// <summary>
 /// AddResume重载
 /// </summary>
 /// <param name="cr"></param>
 /// <returns></returns>
 public bool AddResume(EntitiesModel.ApplyJob cr)
 {
     db.ApplyJob.Add(cr);
     try
     {
         db.SaveChanges();
     }
     catch (Exception e)
     {
         return(false);
     }
     return(true);
 }
Пример #3
0
 /// <summary>
 /// 添加投递简历信息,申请职位操作
 /// </summary>
 /// <returns></returns>
 public bool AddResume(int companyId, int jobsId)
 {
     EntitiesModel.ApplyJob model = new EntitiesModel.ApplyJob()
     {
         CompanyId = companyId, JobId = jobsId
     };
     db.ApplyJob.Add(model);
     try
     {
         db.SaveChanges();
     }
     catch (Exception)
     {
         return(false);
     }
     return(true);
 }