Example #1
0
        public int EngageUpdate(EngageModel p)
        {
            Engage e = new Engage()
            {
                Id            = p.Id,
                Changer       = p.Changer,
                ChangeTime    = p.ChangeTime,
                Claim         = p.Claim,
                Deadline      = p.Deadline,
                Description   = p.Description,
                EngageType    = p.EngageType,
                FirstMid      = p.FirstMid,
                FirstMName    = p.FirstMName,
                MajorId       = p.MajorId,
                MajorKindid   = p.MajorKindid,
                MajorKindName = p.MajorKindName,
                MajorName     = p.MajorName,
                ManCount      = p.ManCount,
                Register      = p.Register,
                RegistTime    = p.RegistTime,
                SecondMid     = p.SecondMid,
                SecondMName   = p.SecondMName,
                ThirdMid      = p.ThirdMid,
                ThirdMName    = p.ThirdMName
            };

            return(Update(e));
        }
Example #2
0
        public List <EngageModel> EngageSelect()
        {
            var list = Select();
            List <EngageModel> list2 = new List <EngageModel>();

            foreach (var p in list)
            {
                EngageModel e = new EngageModel()
                {
                    Id            = p.Id,
                    Changer       = p.Changer,
                    ChangeTime    = p.ChangeTime,
                    Claim         = p.Claim,
                    Deadline      = p.Deadline,
                    Description   = p.Description,
                    EngageType    = p.EngageType,
                    FirstMid      = p.FirstMid,
                    FirstMName    = p.FirstMName,
                    MajorId       = p.MajorId,
                    MajorKindid   = p.MajorKindid,
                    MajorKindName = p.MajorKindName,
                    MajorName     = p.MajorName,
                    ManCount      = p.ManCount,
                    Register      = p.Register,
                    RegistTime    = p.RegistTime,
                    SecondMid     = p.SecondMid,
                    SecondMName   = p.SecondMName,
                    ThirdMid      = p.ThirdMid,
                    ThirdMName    = p.ThirdMName
                };
                list2.Add(e);
            }
            return(list2);
        }
Example #3
0
 /// <summary>
 /// 职位发布修改
 /// </summary>
 /// <param name="em"></param>
 /// <returns></returns>
 public ActionResult Update(EngageModel em)
 {
     if (ieb.EngageUpdate(em) > 0)
     {
         return(Content("<script>alert('修改成功!');location='/Engage/SelectUpdate';</script>"));
     }
     else
     {
         return(Content("<script>alert('修改失败!');</script>"));
     }
 }
Example #4
0
 /// <summary>
 /// 添加职位发布
 /// </summary>
 /// <param name="em"></param>
 /// <returns></returns>
 public ActionResult AddEngageRelease(EngageModel em)
 {
     em.ChangeTime = DateTime.Now;
     if (ieb.EngageAdd(em) > 0)
     {
         return(Content("<script>alert('添加成功');location='../Engage/ToAddEngageRelease';</script>"));
     }
     else
     {
         return(Content("<script>alert('添加失败');location='../Engage/ToAddEngageRelease';</script>"));
     }
 }
Example #5
0
        /// <summary>
        /// 简历审批
        /// </summary>
        /// <param name="id"></param>
        /// <param name="PassPassComment"></param>
        /// <returns></returns>
        public ActionResult EngageEmploySP(int id, string PassPassComment)
        {
            EngageResumeModel er = ierb.EngageResumeSelectBy(id);

            er.PassPassComment = PassPassComment;
            if (ierb.EngageResumeUpdate(er) > 0)
            {
                //修改职位发布表的人数(-1)
                if (er.EngageId > 0)
                {
                    EngageModel em = ieb.EngageBy(er.EngageId);
                    if (em != null)
                    {
                        if (em.ManCount > 0)
                        {
                            em.ManCount--;
                            ieb.EngageUpdate(em);
                        }
                    }
                }
                if (er.HumanEmail != null && er.HumanEmail != "")
                {
                    MailMessage mail = new MailMessage();
                    //发件人邮件地址
                    mail.From = new MailAddress("*****@*****.**");
                    //mail.From = new MailAddress("*****@*****.**");
                    //接收S人的邮件地址
                    mail.To.Add(new MailAddress(er.HumanEmail));
                    //mail.To.Add(new MailAddress("*****@*****.**"));
                    //主题
                    mail.Subject = string.Format("恭喜{0}入职", er.HumanName);
                    mail.Body    = string.Format("{0},你通过了我们公司的面试。快点来入职。", er.HumanName);

                    //创建smtp协议对象
                    SmtpClient sc = new SmtpClient("smtp.163.com")
                    {
                        UseDefaultCredentials = true,
                        EnableSsl             = false,
                        DeliveryMethod        = SmtpDeliveryMethod.Network
                    };;
                    //邮件服务发送的凭证
                    sc.Credentials = new NetworkCredential("*****@*****.**", "123456qq");
                    sc.Send(mail);
                }
                return(Content("<script>alert('提交成功!');location='/EngageEmploy/LYSP';</script>"));
            }
            else
            {
                return(Content("<script>alert('提交失败!');</script>"));
            }
        }
Example #6
0
        // GET: EngageResume

        /// <summary>
        /// 简历登记页面
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult Index(int id = 0)
        {
            //判断是否申请了职位
            ViewBag.MajorKindid   = 0;
            ViewBag.Majorid       = "0";
            ViewBag.MajorKindName = "";
            ViewBag.MajorName     = "";
            ViewBag.EngageId      = 0;
            if (id > 0)
            {
                EngageModel em = ieb.EngageBy(id);
                ViewBag.MajorKindid   = em.MajorKindid;
                ViewBag.Majorid       = em.MajorId;
                ViewBag.MajorKindName = em.MajorKindName;
                ViewBag.MajorName     = em.MajorName;
                ViewBag.EngageId      = id;
            }
            return(View());
        }
Example #7
0
        public List <EngageModel> EngageFY(int currentPage, int pageSize, out int rows)
        {
            var list = CreateContext().Engages.AsNoTracking().OrderBy(e => e.Id);

            rows = list.Count();
            var data = list
                       .Skip((currentPage - 1) * pageSize)
                       .Take(pageSize)
                       .ToList();
            List <EngageModel> list2 = new List <EngageModel>();

            foreach (var p in data)
            {
                EngageModel e = new EngageModel()
                {
                    Id            = p.Id,
                    Changer       = p.Changer,
                    ChangeTime    = p.ChangeTime,
                    Claim         = p.Claim,
                    Deadline      = p.Deadline,
                    Description   = p.Description,
                    EngageType    = p.EngageType,
                    FirstMid      = p.FirstMid,
                    FirstMName    = p.FirstMName,
                    MajorId       = p.MajorId,
                    MajorKindid   = p.MajorKindid,
                    MajorKindName = p.MajorKindName,
                    MajorName     = p.MajorName,
                    ManCount      = p.ManCount,
                    Register      = p.Register,
                    RegistTime    = p.RegistTime,
                    SecondMid     = p.SecondMid,
                    SecondMName   = p.SecondMName,
                    ThirdMid      = p.ThirdMid,
                    ThirdMName    = p.ThirdMName
                };
                list2.Add(e);
            }
            return(list2);
        }
Example #8
0
 public int EngageUpdate(EngageModel p)
 {
     return(ied.EngageUpdate(p));
 }
Example #9
0
 public int EngageAdd(EngageModel p)
 {
     return(ied.EngageAdd(p));
 }