Example #1
0
        public ActionResult List()
        {
            List <Jianli> list = new JIanliBLL().getJlListByKword("");

            ViewBag.list = list;
            return(View());
        }
Example #2
0
        public ActionResult getAdd(Jianli obj)
        {
            obj = new Jianli
            {
                jlId      = obj.jlId,
                jlName    = obj.jlName,
                jlPic     = obj.jlPic,
                jlGender  = obj.jlGender,
                jlage     = obj.jlage,
                jlIC      = obj.jlIC,
                jlEdu     = obj.jlEdu,
                jlGw      = obj.jlGw,
                jlPhone   = obj.jlPhone,
                jlEmail   = obj.jlEmail,
                jlXinzi   = obj.jlXinzi,
                jlHunyin  = obj.jlHunyin,
                jlWork    = obj.jlWork,
                jlPingJia = obj.jlPingJia,
                userID    = obj.userID,
                jl_peixun = obj.jl_peixun,
                jl_jiaoyu = obj.jl_jiaoyu
            };
            int result = new JIanliBLL().Add(obj);

            return(Content("添加成功!"));
        }
Example #3
0
        public ActionResult JlList(string kword, string info, int page = 1)
        {
            List <Jianli> list  = new JIanliBLL().getJlListByKword(kword);
            var           pList = list.ToPagedList(page, 10);

            ViewBag.list = pList;
            ViewBag.info = info;
            return(View(pList));
        }
Example #4
0
        public ActionResult Import()
        {
            HttpPostedFileBase file = Request.Files["excel"];
            var path = Path.Combine(Request.MapPath("/Upload"), file.FileName);

            file.SaveAs(path);
            //从NPOI读取到的Excel的数据
            DataTable excelTable = new DataTable();

            excelTable = ImportExcel.GetExcelDataTable(path);
            ImportExcel.RemoveEmpty(excelTable);
            int result = 0;

            foreach (DataRow dataRow in excelTable.Rows)
            {
                Jianli obj    = new Jianli();
                int    userID = Convert.ToInt32(dataRow["用户编号"]);
                bool   flag   = new JIanliBLL().FindByUId(userID);
                //判断该用户是否存在,若不存在则添加
                if (flag)
                {
                    int ret = new JIanliBLL().ExDel(userID);
                }
                obj = new Jianli
                {
                    userID    = Convert.ToInt32(dataRow["用户编号"]),
                    jlName    = dataRow["姓名"].ToString(),
                    jlPic     = dataRow["头像"].ToString(),
                    jlGender  = dataRow["性别"].ToString(),
                    jlage     = dataRow["出生年月"].ToString(),
                    jlIC      = dataRow["身份证号"].ToString(),
                    jlEdu     = dataRow["学历"].ToString(),
                    jlGw      = dataRow["求职岗位"].ToString(),
                    jlPhone   = dataRow["联系方式"].ToString(),
                    jlEmail   = dataRow["电子邮件"].ToString(),
                    jlXinzi   = Convert.ToInt32(dataRow["期望薪资"]),
                    jlHunyin  = dataRow["婚姻情况"].ToString(),
                    jlWork    = Convert.ToInt32(dataRow["工作年限"]),
                    jlPingJia = dataRow["工作经历"].ToString(),
                    jl_peixun = dataRow["培训经历"].ToString(),
                    jl_jiaoyu = dataRow["教育经历"].ToString()
                };
                result += new JIanliBLL().Add(obj);
            }
            return
                (RedirectToAction("JlList", "Admin", new { info = "导入成功" }));
        }
Example #5
0
        public ActionResult Detail(string id)
        {
            Jianli obj = new JIanliBLL().GetObjByUId(id);

            return(View(obj));
        }
Example #6
0
        public ActionResult getDetail(string id)
        {
            Jianli obj = new JIanliBLL().GetObjByUId(id);

            return(RedirectToAction("Detail", "Jianli", obj));
        }