Ejemplo n.º 1
0
    /// <summary>
    /// 投递简历
    /// </summary>
    private void SubResume()
    {
        BLL.JobBLL  bll  = new BLL.JobBLL();
        BLL.UserBLL ubll = new BLL.UserBLL();
        DataTable   dt   = bll.GetResumeList(" CreateUser='******' ");

        if (dt.Rows.Count == 0)
        {
            throw new Exception("您还没有简历请先创建一份简历!");
        }
        else
        {
            DataRow dr = dt.Rows[0];
            Model.ResumeVsJobModel model = new ResumeVsJobModel();
            model.JobId    = ReStr("JobId");
            model.Memo     = "";
            model.ResumeId = dr["ResumeId"].ToString();
            model.VsType   = "正常投递";
            try
            {
                bll.SubResume(model);
            }
            catch
            {
                throw new Exception("投递错误! 您是否已经投递了此职位?!");
            }
            ReTrue();
        }
    }
Ejemplo n.º 2
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(ResumeVsJobModel model)
        {
            bool          reValue = true;
            int           reCount = 0;
            StringBuilder strSql  = new StringBuilder();

            strSql.Append("update ResumeVsJob set ");

            strSql.Append(" JobId = @JobId , ");
            strSql.Append(" ResumeId = @ResumeId , ");
            strSql.Append(" VsType = @VsType , ");
            strSql.Append(" Memo = @Memo  ");
            strSql.Append(" where JobId=@JobId and ResumeId=@ResumeId  ");

            SqlParameter[] parameters =
            {
                new SqlParameter("@JobId",    SqlDbType.VarChar, 50),
                new SqlParameter("@ResumeId", SqlDbType.VarChar, 50),
                new SqlParameter("@VsType",   SqlDbType.VarChar, 10),
                new SqlParameter("@Memo",     SqlDbType.VarChar, 100)
            };

            parameters[0].Value = model.JobId;
            parameters[1].Value = model.ResumeId;
            parameters[2].Value = model.VsType;
            parameters[3].Value = model.Memo; try
            {//异常处理
                reCount = this.helper.ExecSqlReInt(strSql.ToString(), parameters);
            }
            catch (Exception ex)
            {
                this.helper.Close();
                throw ex;
            }
            if (reCount <= 0)
            {
                reValue = false;
            }
            return(reValue);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(ResumeVsJobModel model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into ResumeVsJob(");
            strSql.Append("JobId,ResumeId,VsType,Memo");
            strSql.Append(") values (");
            strSql.Append("@JobId,@ResumeId,@VsType,@Memo");
            strSql.Append(") ");

            SqlParameter[] parameters =
            {
                new SqlParameter("@JobId",    SqlDbType.VarChar, 50),
                new SqlParameter("@ResumeId", SqlDbType.VarChar, 50),
                new SqlParameter("@VsType",   SqlDbType.VarChar, 10),
                new SqlParameter("@Memo",     SqlDbType.VarChar, 100)
            };

            parameters[0].Value = model.JobId;
            parameters[1].Value = model.ResumeId;
            parameters[2].Value = model.VsType;
            parameters[3].Value = model.Memo;

            bool result = false;

            try
            {
                helper.ExecSqlReInt(strSql.ToString(), parameters);
                result = true;
            }
            catch (Exception ex)
            {
                this.helper.Close();
                throw ex;
            }
            finally
            {
            }
            return(result);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// 投递一份简历
 /// </summary>
 /// <param name="model"></param>
 public void SubResume(ResumeVsJobModel model)
 {
     DAL.ResumeVsJobDAL dal = new DAL.ResumeVsJobDAL();
     dal.Add(model);
 }