Ejemplo n.º 1
0
 public ActionResult register_choose_picture(human_file hf)
 {
     if (hf.huf_id == 0)
     {
         if (hfs.Add(hf))
         {
             return(Content(TcUlit.TC("成功", "check_list")));
         }
         else
         {
             return(Content(TcUlit.TC("失败", "check_list")));
         }
     }
     else
     {
         if (hfs.Upd(hf))
         {
             return(Content(TcUlit.TC("成功", "check_list")));
         }
         else
         {
             return(Content(TcUlit.TC("失败", "check_list")));
         }
     }
 }
Ejemplo n.º 2
0
        //3.变更
        public ActionResult BianGeng(human_file hff)
        {
            int        huf_id = Convert.ToInt32(Request["huf_idhaha"]);
            human_file hf     = hhff.human_fileWhere(e => e.huf_id == huf_id).FirstOrDefault();

            hf.changer               = hff.changer;               //档案变更人
            hf.lastly_change_time    = DateTime.Now;              //档案最近更改时间
            hf.change_time           = DateTime.Now;              //变更时间
            hf.human_nationality     = hff.human_nationality;     //(选择性修改)1.国籍
            hf.human_race            = hff.human_race;            //(选择性修改)2.民族
            hf.human_religion        = hff.human_religion;        //(选择性修改)3.宗教信仰
            hf.human_party           = hff.human_party;           //(选择性修改)4.政治面貌
            hf.human_educated_degree = hff.human_educated_degree; //(选择性修改)5.国籍
            hf.human_educated_years  = hff.human_educated_years;  //(选择性修改)6.教育年限
            hf.human_educated_major  = hff.human_educated_major;  //(选择性修改)7.学历专业
            hf.human_speciality      = hff.human_speciality;      //(选择性修改)8.特长
            hf.human_hobby           = hff.human_hobby;           //(选择性修改)9.爱好
            if (hhff.human_fileUpdate(hf) > 0)
            {
                return(Content("<script>alert('人力资源档案变更成功!');location.href='/human_change_locate/BianGengIndex';</script>"));
            }
            else
            {
                return(View(hf));
            }
        }
Ejemplo n.º 3
0
        public ActionResult UploadX(HttpPostedFileBase file)
        {
            int ok = 0;

            if (file != null)
            {
                string     id         = Request["fileId"];
                human_file fileUpdate = new human_file();
                fileUpdate = file_bll.SelectHuanm(e => e.human_id == id);
                //
                string fileName = Path.GetFileName(file.FileName);             //获取文件名
                int    i        = fileName.IndexOf('.');
                fileUpdate.attachment_name = fileName.Substring(0, i);         //获取相片名称
                string path = Server.MapPath(string.Format("~/{0}", "Files")); //保存路径
                if (!Directory.Exists(path))                                   //判断是否有保存路径
                {
                    Directory.CreateDirectory(path);                           //没有就再创一个需要的
                }
                file.SaveAs(Path.Combine(path, fileName));                     //保存图片
                fileUpdate.human_picture = fileName;                           //路径=存储路径+文件名+文件后缀
                ok += file_bll.UpdateFile(fileUpdate);
            }
            if (ok == 1)
            {
                return(View("Index"));
            }
            else
            {
                return(RedirectToAction("InsertHuman_file", "HumanResources", Request["fileId"]));
            }
        }
Ejemplo n.º 4
0
        public ActionResult FuHe(human_file hfa)
        {
            salary_standard ssd = issdb.SelectWhere(e => e.standard_id == hfa.salary_standard_id).FirstOrDefault();

            hfa.salary_standard_name = ssd.standard_name;
            hfa.check_status         = 1;
            hfa.salary_sum           = ssd.salary_sum;
            hfa.demand_salaray_sum   = ssd.salary_sum;
            hfa.paid_salary_sum      = ssd.salary_sum;
            hfa.human_file_status    = true;
            if (hfa.file_chang_amount == null)
            {
                hfa.file_chang_amount = 0;
            }
            else
            {
                hfa.file_chang_amount++;
            }

            hfa.lastly_change_time = DateTime.Now;
            if (ihdb.Update(hfa) > 0)
            {
                return(Content("<script>location.href='/Human_file/Top_file/" + hfa.huf_id + "'</script>"));
            }
            else
            {
                return(Content("<script>alert('复核失败');location.href='/Human_file/index'</script>"));
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 复核页面
        /// </summary>
        /// <returns></returns>
        public ActionResult GetShow(string id)
        {
            Int16      humanId = Convert.ToInt16(id);
            human_file file    = file_bll.SelectHuanm(e => e.huf_id == humanId);

            return(View(file));
        }
Ejemplo n.º 6
0
        public ActionResult index(human_file hf)
        {
            config_file_first_kind  s   = ifkb.selectWhere(e => e.first_kind_id == hf.first_kind_id).FirstOrDefault();
            config_file_second_kind s1  = iskb.SelectWhere(e => e.second_kind_id == hf.second_kind_id).FirstOrDefault();
            config_file_third_kind  s2  = itkb.SelectWhere(e => e.third_kind_id == hf.third_kind_id).FirstOrDefault();
            config_major            s3  = imb.SelectWhere(e => e.major_id == hf.human_major_id).FirstOrDefault();
            config_major_kind       s4  = imkb.SelectWhere(e => e.major_kind_id == hf.human_major_kind_id).FirstOrDefault();
            salary_standard         ssd = issdb.SelectWhere(e => e.standard_id == hf.salary_standard_id).FirstOrDefault();

            hf.salary_standard_name  = ssd.standard_name;
            hf.first_kind_name       = s.first_kind_name;
            hf.second_kind_name      = s1.second_kind_name;
            hf.third_kind_name       = s2.third_kind_name;
            hf.hunma_major_name      = s3.major_name;
            hf.human_major_kind_name = s4.major_kind_name;
            hf.check_status          = 0;
            hf.salary_sum            = ssd.salary_sum;
            hf.demand_salaray_sum    = ssd.salary_sum;
            hf.paid_salary_sum       = ssd.salary_sum;
            hf.file_chang_amount     = 0;
            hf.lastly_change_time    = DateTime.Now;
            if (ihdb.Update(hf) > 0)
            {
                return(Content("<script>location.href='/Human_file/Top_file/" + hf.huf_id + "'</script>"));
            }
            else
            {
                return(Content("<script>alert('登记失败');location.href='/Human_file/index'</script>"));
            }
        }
Ejemplo n.º 7
0
        public ActionResult interview_add(engage_interview ei, human_file hf)
        {
            eis.Add(ei);

            // hfs.Add(hf);
            return(Content(TcUlit.TC("面试成功", "/recruit/sift_list")));
        }
Ejemplo n.º 8
0
        public ActionResult delete(short id)
        {
            human_file emr = new human_file();

            emr.huf_id = id;
            hfs.Del(emr);
            return(Json("ok", JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 9
0
        public ActionResult detail(string id)
        {
            human_file hh = HB.SelectWhere(Convert.ToInt32(id)).LastOrDefault();

            ViewBag.st  = hh;
            ViewBag.st2 = Mb.SelectWhere(hh.human_id).LastOrDefault();
            return(View());
        }
Ejemplo n.º 10
0
        /// <summary>
        /// 复核
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult human_check(short id)
        {
            human_file hf = new human_file();

            hf.huf_id       = id;
            ViewData.Model  = hfs.SelectOne(hf);
            ViewData["gjz"] = cps.Select();
            return(View());
        }
Ejemplo n.º 11
0
        public ActionResult recovery_list_information(short id)
        {
            human_file hf = new human_file();

            hf.huf_id       = id;
            ViewData.Model  = hfs.SelectOne(hf);
            ViewData["gjz"] = cps.Select();
            return(View());
        }
Ejemplo n.º 12
0
        /// <summary>
        /// 修改展示页面
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult UpdateShow(string id)
        {
            human_file file = new human_file()
            {
                huf_id = Convert.ToInt16(id)
            };

            file = file_bll.SelectHuanm(e => e.huf_id == file.huf_id);
            return(View(file));
        }
Ejemplo n.º 13
0
        public ActionResult change_list_information(short id)
        {
            ViewData["yi"]   = cffks.Select();
            ViewData["zwfl"] = cmks.Select();
            human_file hf = new human_file();

            hf.huf_id       = id;
            ViewData.Model  = hfs.SelectOne(hf);
            ViewData["gjz"] = cps.Select();
            return(View());
        }
Ejemplo n.º 14
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="filePage"></param>
 /// <returns></returns>
 public ActionResult UpdateData(human_file filePage)
 {
     if (file_bll.UpdateFile(filePage) > 0)
     {
         return(RedirectToAction("UpdateSelect", "FileChick"));
     }
     else
     {
         return(RedirectToAction("UpdateShow", "FileChick", filePage.huf_id));
     }
 }
Ejemplo n.º 15
0
        //人力资源档案永久删除
        public ActionResult True_Del(int id)
        {
            human_file hf = ihdb.SelectWhere(e => e.huf_id == id).FirstOrDefault();

            if (ihdb.Del(hf) > 0)
            {
                return(Content("<script>alert('永久删除成功!');location.href='/Human_file/index7'</script>"));
            }
            else
            {
                return(Content("<script>alert('永久删除失败!');location.href='/Human_file/index7'</script>"));
            }
        }
Ejemplo n.º 16
0
        public ActionResult register(short id)
        {
            ViewData["zw"] = cmks.Select();
            ViewData["yi"] = cffks.Select();
            ViewData["xc"] = sss.Select();
            human_file hf = new human_file()
            {
                huf_id = id
            };

            ViewData.Model = hfs.SelectOne(hf);
            return(View());
        }
Ejemplo n.º 17
0
        //提交
        public ActionResult Tijiao(human_file hf)
        {
            int resid = Convert.ToInt32(Request["residhahaha"]);
            List <engage_resume> list = erBll.engage_resumeWhere(e => e.res_id == resid);

            hf.checker  = list[0].checker;  //档案复核人(简历表复核人)
            hf.register = list[0].register; //登记人  本来是session值
            string humanID     = "";        //档案编号
            var    sum         = hhff.human_fileSelect();
            var    flowNoStart = DateTime.Now.ToString("yyyyMMdd");

            //查询数据库里面有没有数据
            if (sum.Count > 0)
            {
                int        Count   = sum.Count;
                human_file huCount = sum[Count - 1];//从零开始,所以减一。
                int        Number  = Convert.ToInt32(huCount.human_id.Substring(huCount.human_id.Length - 2, 2));
                Number++;
                humanID = Number.ToString();
                humanID = "bt" + flowNoStart + humanID;
            }
            else
            {
                humanID = "bt" + flowNoStart + "01";
            }
            hf.human_id = humanID;//档案编号
            List <config_file_first_kind> listfirst_kind_name = cffkBll.TiaojianChaXun(e => e.first_kind_id == hf.first_kind_id);

            hf.first_kind_name = listfirst_kind_name[0].first_kind_name;//一级机构名称
            List <config_file_second_kind> listsecond_kind_name = cfskBll.TiaojianChaXun(e => e.second_kind_id == hf.second_kind_id);

            hf.second_kind_name = listsecond_kind_name[0].second_kind_name;//二级机构名称
            List <config_file_third_kind> listthird_kind_name = cftkBll.TiaojianChaXun(e => e.third_kind_id == hf.third_kind_id);

            hf.third_kind_name = listthird_kind_name[0].third_kind_name;//三级机构名称
            List <salary_standard> Listsalary_standfard_name = ssdd.salary_standardWhere(e => e.standard_id == hf.salary_standard_id);

            hf.salary_standard_name = Listsalary_standfard_name[0].standard_name;//薪酬名称
            int result = hhff.human_fileAdd(hf);

            if (true)
            {
                return(Content("<script>alert('人力资源档案提交成功!');location.href='/human_register/TuPian/?humanID=" + humanID + "';</script>"));
            }
            //else
            //{
            //    return Content("<script>alert('人力资源档案提交失败!');location.href='/human_register/Index';</script>");
            //}
        }
Ejemplo n.º 18
0
        //永久删除
        public ActionResult YongJiuDelete()
        {
            int        huf_id = Convert.ToInt32(Request["huf_id"]);
            human_file hf     = new human_file();

            hf.huf_id = short.Parse(huf_id.ToString());
            if (hhff.human_fileDelete(hf) > 0)
            {
                return(Content("<script>alert('档案已删除!!!!');location.href='/human_delete_forever_list/Index';</script>"));
            }
            else
            {
                return(View(hf));
            }
        }
Ejemplo n.º 19
0
        public ActionResult HuiFu_human_xijie(human_file hfaawa)
        {
            human_file hf = ihdb.SelectWhere(e => e.huf_id == hfaawa.huf_id).FirstOrDefault();

            hf.human_file_status  = true;
            hf.lastly_change_time = DateTime.Now;
            hf.recovery_time      = DateTime.Now;
            if (ihdb.Update(hf) > 0)
            {
                return(Content("<script>alert('恢复成功');location.href='/Human_file/index6'</script>"));
            }
            else
            {
                return(Content("<script>alert('恢复失败');location.href='/Human_file/index6'</script>"));
            }
        }
        //修改简历信息状态
        public ActionResult Delete()
        {
            int        huf_id = Convert.ToInt32(Request["huf_idhaha"]);
            human_file hf     = hhff.human_fileWhere(e => e.huf_id == huf_id).FirstOrDefault();

            hf.delete_time       = DateTime.Now; //档案删除时间
            hf.human_file_status = false;        //档案状态
            if (hhff.human_fileUpdate(hf) > 0)
            {
                return(Content("<script>alert('人力资源档案删除成功!');location.href='/human_delete_locate/Index';</script>"));
            }
            else
            {
                return(View(hf));
            }
        }
Ejemplo n.º 21
0
        /// <summary>
        /// 复核修改
        /// </summary>
        /// <param name="file"></param>
        /// <returns></returns>
        public ActionResult UpdateFile(human_file file)
        {
            human_file fileUpdate = file_bll.SelectHuanm(e => e.huf_id == file.huf_id);

            fileUpdate.check_time         = file.check_time;
            fileUpdate.checker            = file.checker;
            fileUpdate.change_time        = DateTime.Now;
            fileUpdate.lastly_change_time = DateTime.Now;
            fileUpdate.remark             = file.remark;
            if (file_bll.UpdateFile(fileUpdate) > 0)
            {
                return(View("Index"));
            }
            else
            {
                return(RedirectToAction("GetShow", "FileChick", file.human_id));
            }
        }
Ejemplo n.º 22
0
        public ActionResult Baingeng_human_xijie(int id)
        {
            human_file hf = ihdb.SelectWhere(e => e.huf_id == id).FirstOrDefault();

            ViewBag.guoji    = ipcb.SelectWhere(e => e.attribute_kind == "国籍");
            ViewBag.minzu    = ipcb.SelectWhere(e => e.attribute_kind == "民族");
            ViewBag.xinyan   = ipcb.SelectWhere(e => e.attribute_kind == "宗教信仰");
            ViewBag.mianmao  = ipcb.SelectWhere(e => e.attribute_kind == "政治面貌");
            ViewBag.xueli    = ipcb.SelectWhere(e => e.attribute_kind == "学历");
            ViewBag.nianxian = ipcb.SelectWhere(e => e.attribute_kind == "教育年限");
            ViewBag.zhuanye  = ipcb.SelectWhere(e => e.attribute_kind == "专业");
            ViewBag.techang  = ipcb.SelectWhere(e => e.attribute_kind == "特长");
            ViewBag.aihao    = ipcb.SelectWhere(e => e.attribute_kind == "爱好");
            ViewBag.chenzhi  = ipcb.SelectWhere(e => e.attribute_kind == "职称");
            ViewBag.xinchou  = issdb.Select();
            ViewBag.user     = iub.Select();
            return(View(hf));
        }
        //通过复核
        public ActionResult TongGuoFH(human_file hh)
        {
            int        huf_id = Convert.ToInt32(Request["huf_idhaha"]);
            human_file hf     = hhff.human_fileWhere(e => e.huf_id == huf_id).FirstOrDefault();

            hf.lastly_change_time = DateTime.Now;  //档案最近更改时间
            hf.check_time         = hh.check_time; //复核时间
            hf.check_status       = 1;             //复核状态
            hf.checker            = hh.checker;    //复核人
            hf.human_file_status  = true;          //档案状态
            if (hhff.human_fileUpdate(hf) > 0)
            {
                return(Content("<script>alert('人力资源档案复核成功!');location.href='/human_query_locate/ChaXunIndex';</script>"));
            }
            else
            {
                return(Content("<script>alert('人力资源档案复核失败!');location.href='/human_register/TuPian';</script>"));
            }
        }
Ejemplo n.º 24
0
        public ActionResult Index(int id)
        {
            ViewBag.guoji    = ipcb.SelectWhere(e => e.attribute_kind == "国籍");
            ViewBag.minzu    = ipcb.SelectWhere(e => e.attribute_kind == "民族");
            ViewBag.xinyan   = ipcb.SelectWhere(e => e.attribute_kind == "宗教信仰");
            ViewBag.mianmao  = ipcb.SelectWhere(e => e.attribute_kind == "政治面貌");
            ViewBag.xueli    = ipcb.SelectWhere(e => e.attribute_kind == "学历");
            ViewBag.nianxian = ipcb.SelectWhere(e => e.attribute_kind == "教育年限");
            ViewBag.zhuanye  = ipcb.SelectWhere(e => e.attribute_kind == "专业");
            ViewBag.techang  = ipcb.SelectWhere(e => e.attribute_kind == "特长");
            ViewBag.aihao    = ipcb.SelectWhere(e => e.attribute_kind == "爱好");
            ViewBag.chenzhi  = ipcb.SelectWhere(e => e.attribute_kind == "职称");
            ViewBag.xinchou  = issdb.Select();
            ViewBag.yiji     = ifkb.SelectAll();
            ViewBag.fl       = imkb.Select();
            ViewBag.user     = "******";
            human_file h = ihdb.SelectWhere(e => e.huf_id == id).FirstOrDefault();

            return(View(h));
        }
Ejemplo n.º 25
0
        //登记
        public async Task <int> Denji(human_fileModel1 hfm)
        {
            human_file fh = new human_file()
            {
                huf_id          = hfm.huf_id,
                paid_salary_sum = hfm.paid_salary_sum,
                salary_sum      = hfm.salary_sum,
                register        = hfm.register,
                check_status    = hfm.check_status,
                regist_time     = hfm.regist_time
            };

            tescDbContext.hf.Attach(fh);
            tescDbContext.Entry(fh).Property(p => p.paid_salary_sum).IsModified = true;
            tescDbContext.Entry(fh).Property(p => p.salary_sum).IsModified      = true;
            tescDbContext.Entry(fh).Property(p => p.register).IsModified        = true;
            tescDbContext.Entry(fh).Property(p => p.check_status).IsModified    = true;
            tescDbContext.Entry(fh).Property(p => p.regist_time).IsModified     = true;
            return(await tescDbContext.SaveChangesAsync());
        }
Ejemplo n.º 26
0
        //图片附件操作
        public ActionResult TuPianFJCZ(HttpPostedFileBase file, string humanFilehumanId)
        {
            human_file list = hhff.human_fileWhere(e => e.human_id == humanFilehumanId).FirstOrDefault();

            if (list != null)
            {
                var fileName = file.FileName;
                var filePath = Server.MapPath(string.Format("~/{0}", "TuPian2"));
                file.SaveAs(Path.Combine(filePath, fileName));
                list.attachment_name   = fileName;
                list.human_file_status = true;
            }
            if (hhff.human_fileUpdate(list) > 0)
            {
                return(Content("<script>alert('附件上传成功!');location.href='/human_register/TuPian/?humanID=" + humanFilehumanId + "'</script>"));
            }
            else
            {
                return(View(list));
            }
        }
Ejemplo n.º 27
0
        //图片上传操作
        public ActionResult TuPianCZ(HttpPostedFileBase filett, string humanID)
        {
            //humanID = Request["humanID"];
            human_file list = hhff.human_fileWhere(e => e.human_id == humanID).FirstOrDefault();

            if (filett != null)
            {
                var fileName = filett.FileName;
                var filePath = Server.MapPath(string.Format("~/{0}", "TuPian"));
                filett.SaveAs(Path.Combine(filePath, fileName));
                list.human_picture     = fileName;
                list.human_file_status = true;
            }
            if (hhff.human_fileUpdate(list) > 0)
            {
                return(Content("<script>alert('上传成功!');location.href='/human_register/TuPianFJ/?humanIDfj=" + humanID + "'</script>"));
            }
            else
            {
                return(View(list));
            }
        }
Ejemplo n.º 28
0
        /// <summary>
        /// 提交数据及文件上传
        /// </summary>
        /// <param name="file"></param>
        /// <returns></returns>
        public ActionResult InsertFile(human_file file)
        {
            human_file      fileInsert = file;
            salary_standard standard   = standard_bll.salary_standardselectWhere(e => e.standard_id == file.salary_standard_id);

            fileInsert.salary_sum          = standard.salary_sum; //薪酬基本总额
            fileInsert.demand_salaray_sum  = standard.salary_sum; //应发金额
            fileInsert.paid_salary_sum     = standard.salary_sum; //应发金额
            fileInsert.major_change_amount = 0;
            fileInsert.bonus_amount        = 0;
            fileInsert.training_amount     = 0;
            fileInsert.file_chang_amount   = 0;
            //修改简历信息
            engage_resume resume = new engage_resume()
            {
                res_id = Convert.ToInt16(fileInsert.human_id)
            };

            resume = resume_bll.GetWhereResume(resume);
            resume.pass_passComment = "已入档案";
            int ok = 0;

            using (TransactionScope ts = new TransactionScope())
            {
                ok += resume_bll.UpdateResumeState(resume);
                ok += file_bll.InsertFile(fileInsert);
                if (ok == 2)
                {
                    ts.Complete();//提交事务
                    ViewBag.fileHumanId = fileInsert.human_id;
                    return(View());
                }
                else
                {
                    return(RedirectToAction("InsertHuman_file", "HumanResources", fileInsert.human_id));
                }
            }
        }
Ejemplo n.º 29
0
        //存条件
        private void GetWhere(human_file hfwaa, string startDate, string endDate)
        {
            if (hfwaa.first_kind_id != null && hfwaa.second_kind_id != null && hfwaa.third_kind_id != null && hfwaa.human_major_id != null && hfwaa.human_major_kind_id != null && startDate != "" && endDate != "")
            {
                DateTime sta = DateTime.Parse(startDate);
                DateTime end = DateTime.Parse(endDate);
                //where =
                Dictionary <string, object> di = new Dictionary <string, object>();
                di.Add("yiji", hfwaa.first_kind_id);
                di.Add("erji", hfwaa.second_kind_id);
                di.Add("sanji", hfwaa.third_kind_id);
                di.Add("zhiye", hfwaa.human_major_id);
                di.Add("zhiyefl", hfwaa.human_major_kind_id);
                di.Add("sta", sta);
                di.Add("end", end);

                Session["where"] = di;
            }
            else
            {
                Session["where"] = null;
            }
        }
Ejemplo n.º 30
0
        //上传附件提交
        public ActionResult TopFu_file(IEnumerable <HttpPostedFileBase> file_filename, int id)
        {
            string s    = "";
            string type = "";

            getFile(file_filename, ref s, ref type, "Fufile");

            if (type == ".doc" || type == ".txt" || type == ".pdf" || type == ".jpg" || type == "")
            {
                human_file hff = ihdb.SelectWhere(e => e.huf_id == id).FirstOrDefault();
                if (s == null || s == "")//判断fileName==null就在里面进行判断数据库的文件列是不是也为空,是就赋null
                {
                    if (hff.attachment_name == null)
                    {
                        hff.attachment_name = s;
                    }
                }
                else
                {
                    hff.attachment_name = s;
                }


                if (ihdb.Update(hff) > 0)
                {
                    return(Content("<script>alert('上传附件成功');location.href='/Human_file/Top_file_file/" + id + "'</script>"));
                }
                else
                {
                    return(Content("<script>alert('上传附件失败');location.href='/Human_file/Top_file_file/" + id + "'</script>"));
                }
            }
            else
            {
                return(Content("<script>alert('文件类型错误');location.href='/Human_file/Top_file_file/" + id + "';</script>"));
            }
        }