示例#1
0
        /// <summary>
        /// 添加员工的方法
        /// </summary>
        /// <returns></returns>
        public ActionResult ExeAddEmployeer(EmployeeInfo _em)
        {
            string imgurl = ExeAddImg();

            if (imgurl != null)
            {
                _em.EmployeeHead = imgurl;
                _em.BirthDay     = _em.IDNumber.ToString().Substring(6, 4) + "/" + _em.IDNumber.ToString().Substring(10, 2) + "/" + _em.IDNumber.ToString().Substring(12, 2);
            }

            bool isAdd = dal.AddEmployeer(_em);

            if (isAdd)
            {
                RedirectToAction("EmployeerList");
            }
            return(RedirectToAction("EmployeerList"));
        }