コード例 #1
0
        public ActionResult register(major_change change2)
        {
            //给状态修改成1
            string name = Session["uname"].ToString();

            change2.check_status = 1;
            change2.regist_time  = DateTime.Now;
            if (change2.new_second_kind_name == "-----请选择-----")
            {
                change2.new_second_kind_name = null;
            }
            if (change2.new_third_kind_name == "-----请选择-----")
            {
                change2.new_third_kind_name = null;
            }
            if (change2.new_major_name == "-----请选择-----")
            {
                change2.new_major_name = null;
            }
            //int result = major.Updates(change2);
            int result = major.Insert(change2);

            if (result > 0)
            {
                return(Content("<script>window.location.href='/register_locate/register_success';</script>"));
            }
            else
            {
                return(Content("<script>alert('登记失败!');window.location.href='/register_locate/register_list';</script>"));
            }
        }
コード例 #2
0
        /// <summary>
        /// 调动审核
        /// 修改major_change check_status:通过的状态为2,不通过为0
        /// </summary>
        /// <param name="change"></param>
        /// <returns></returns>
        public ActionResult check(major_change change)
        {
            if (change.new_second_kind_name == "-----请选择-----")
            {
                change.new_second_kind_name = null;
            }
            if (change.new_third_kind_name == "-----请选择-----")
            {
                change.new_third_kind_name = null;
            }
            if (change.new_major_name == "-----请选择-----")
            {
                change.new_major_name = null;
                change.new_major_id   = null;
            }
            int result = major.Updates(change);

            if (result > 0)
            {
                return(Content("<script>window.location.href='/register_locate/check_success';</script>"));
            }
            else
            {
                return(Content("<script>alert('复核失败!');window.location.href='/register_locate/check_success';</script>"));
            }
        }
コード例 #3
0
        public bool updatahf(major_change mc, short id)
        {
            string sql = string.Format("update [dbo].[human_file] set [first_kind_id]='{0}',[first_kind_name]='{1}',[second_kind_id]='{2}',[second_kind_name]='{3}',[third_kind_id]='{4}',[third_kind_name]='{5}',salary_standard_id='{6}',[salary_standard_name]='{7}' where [huf_id]='{8}'",
                                       mc.new_first_kind_id, mc.new_first_kind_name, mc.new_second_kind_id, mc.new_second_kind_name, mc.new_third_kind_id
                                       , mc.new_third_kind_name, mc.major_id, mc.major_name, id);

            return(SqlHelper.zsg(sql) > 0);
        }
コード例 #4
0
ファイル: transferController.cs プロジェクト: LiuDaShuaiBi/L
        public ActionResult register_success(major_change mc)
        {
            mcs.Add(mc);
            short id = short.Parse(Request["huf_id"]);

            hfs.DD(mc, id);
            return(View());
        }
コード例 #5
0
ファイル: transferController.cs プロジェクト: LiuDaShuaiBi/L
        public ActionResult detail(short id)
        {
            major_change mc = new major_change()
            {
                mch_id = id
            };

            ViewData.Model = mcs.SelectOne(mc);
            return(View());
        }
コード例 #6
0
        public async Task <int> Up(int id, major_changeModel m)
        {
            major_change mc = hr.Set <major_change>().AsNoTracking().Where(e => e.mch_id == id).FirstOrDefault();

            mc.check_status = m.check_status;
            mc.check_reason = m.check_reason;
            // mc = new major_change()
            //{
            //    mch_id = m.mch_id,
            //    first_kind_id = m.first_kind_id,
            //    first_kind_name = m.first_kind_name,
            //    second_kind_id = m.second_kind_id,
            //    second_kind_name = m.second_kind_name,
            //    third_kind_id = m.third_kind_id,
            //    third_kind_name = m.third_kind_name,
            //    major_id = m.major_id,
            //    major_name = m.major_name,
            //    major_kind_id = m.major_kind_id,
            //    major_kind_name = m.major_kind_name,
            //    new_first_kind_id = m.new_first_kind_id,
            //    new_first_kind_name = m.new_first_kind_name,
            //    new_second_kind_id = m.new_second_kind_id,
            //    new_second_kind_name = m.new_second_kind_name,
            //    new_third_kind_id = m.new_third_kind_id,
            //    new_third_kind_name = m.new_third_kind_name,
            //    new_major_id = m.new_major_id,
            //    new_major_name = m.new_major_name,
            //    new_major_kind_id = m.new_major_kind_id,
            //    new_major_kind_name = m.new_major_kind_name,
            //    human_id = m.human_id,
            //    human_name = m.human_name,
            //    salary_standard_id = m.salary_standard_id,
            //    salary_standard_name = m.salary_standard_name,
            //    salary_sum = m.salary_sum,
            //    new_salary_standard_id = m.new_salary_standard_id,
            //    new_salary_standard_name = m.new_salary_standard_name,
            //    new_salary_sum = m.new_salary_sum,
            //    change_reason = m.change_reason,
            //    check_reason = m.check_reason,
            //    check_status = m.check_status,
            //    register = m.register,
            //    checker = m.checker,
            //    regist_time = m.regist_time,
            //    check_time = m.check_time
            //};
            //hr.
            // hr.Database.ExecuteSqlCommand();
            string sql = $@"update major_change set check_status={m.check_status},check_reason='{m.check_reason}' where mch_id={m.mch_id} ";

            return(hr.Database.ExecuteSqlCommand(sql));
            //hr.Entry(mc).State = EntityState.Unchanged;
            //hr.Entry(mc).State = EntityState.Modified;
            //return await hr.SaveChangesAsync();
        }
コード例 #7
0
ファイル: transferController.cs プロジェクト: LiuDaShuaiBi/L
        // GET: transfer
        public ActionResult check(short id)
        {
            ViewData["xc"] = sss.Select();
            ViewData["yi"] = cffks.Select();
            ViewData["zw"] = cms.Select();
            major_change hf = new major_change()
            {
                mch_id = id
            };

            ViewData.Model = mcs.SelectOne(hf);
            return(View());
        }
コード例 #8
0
        public ActionResult check(int id)
        {
            users u = Session["userClass"] as users;//从登录进来的session里面获取uuname

            Session["uuname"] = u.u_name;
            List <major_change>   list  = major.SelectWhere(e => e.mch_id == id);
            List <SelectListItem> list2 = SelectClass();

            ViewData["list"] = list2;
            major_change mc = new major_change()
            {
                mch_id                   = list[0].mch_id,
                human_name               = list[0].human_name,               //姓名
                first_kind_id            = list[0].first_kind_id,            //一级编号
                first_kind_name          = list[0].first_kind_name,          //一级结构名称
                second_kind_id           = list[0].second_kind_id,           //二级编号
                second_kind_name         = list[0].second_kind_name,         //二级名字
                third_kind_id            = list[0].third_kind_id,            //三级编号
                third_kind_name          = list[0].third_kind_name,          //三级机构名称
                major_kind_id            = list[0].major_kind_id,            //职位分类编号
                major_kind_name          = list[0].major_kind_name,          //职位分类名称
                major_id                 = list[0].major_id,                 //职位编号
                major_name               = list[0].major_name,               //职位名称
                new_first_kind_id        = list[0].new_first_kind_id,        //新一级机构编号
                new_first_kind_name      = list[0].new_first_kind_name,      //新一级机构名称
                new_second_kind_id       = list[0].new_second_kind_id,       //新二级机构编号
                new_second_kind_name     = list[0].new_second_kind_name,     //新二级机构名称
                new_third_kind_id        = list[0].new_third_kind_id,        //新三级机构编号
                new_third_kind_name      = list[0].new_third_kind_name,      //新三级机构名称
                new_major_kind_id        = list[0].new_major_kind_id,        //新职位分类编号
                new_major_kind_name      = list[0].new_major_kind_name,      //新职位分类名称
                new_major_id             = list[0].new_major_id,             //新职位编号
                new_major_name           = list[0].new_major_name,           //新职位名称
                human_id                 = list[0].human_id,                 //人力资源档案编号
                salary_standard_id       = list[0].salary_standard_id,       //薪酬标准编号
                salary_standard_name     = list[0].salary_standard_name,     //薪酬标准名称
                salary_sum               = list[0].salary_sum,               //薪酬总额
                new_salary_standard_id   = list[0].new_salary_standard_id,   //新薪酬标准编号
                new_salary_standard_name = list[0].new_salary_standard_name, //新薪酬标准名称
                new_salary_sum           = list[0].new_salary_sum,           //新薪酬总额
                change_reason            = list[0].change_reason,            //调动原因
                check_reason             = list[0].check_reason,             //审核通过意见
                check_status             = list[0].check_status,             //复核通过状态
                register                 = list[0].register,                 //登记人
                checker                  = list[0].checker,                  //复核人
                regist_time              = list[0].regist_time,              //登记时间
                check_time               = list[0].check_time,               //复核时间
            };

            return(View(mc));
        }
コード例 #9
0
        public async Task <int> Ad(major_changeModel m)
        {
            major_change mm = new major_change()
            {
                mch_id                   = m.mch_id,
                first_kind_id            = m.first_kind_id,
                first_kind_name          = m.first_kind_name,
                second_kind_id           = m.second_kind_id,
                second_kind_name         = m.second_kind_name,
                third_kind_id            = m.third_kind_id,
                third_kind_name          = m.third_kind_name,
                major_id                 = m.major_id,
                major_name               = m.major_name,
                major_kind_id            = m.major_kind_id,
                major_kind_name          = m.major_kind_name,
                new_first_kind_id        = m.new_first_kind_id,
                new_first_kind_name      = m.new_first_kind_name,
                new_second_kind_id       = m.new_second_kind_id,
                new_second_kind_name     = m.new_second_kind_name,
                new_third_kind_id        = m.new_third_kind_id,
                new_third_kind_name      = m.new_third_kind_name,
                new_major_id             = m.new_major_id,
                new_major_name           = m.new_major_name,
                new_major_kind_id        = m.new_major_kind_id,
                new_major_kind_name      = m.new_major_kind_name,
                human_id                 = m.human_id,
                human_name               = m.human_name,
                salary_standard_id       = m.salary_standard_id,
                salary_standard_name     = m.salary_standard_name,
                salary_sum               = m.salary_sum,
                new_salary_standard_id   = m.new_salary_standard_id,
                new_salary_standard_name = m.new_salary_standard_name,
                new_salary_sum           = m.new_salary_sum,
                change_reason            = m.change_reason,
                check_reason             = m.check_reason,
                check_status             = m.check_status,
                register                 = m.register,
                checker                  = m.checker,
                regist_time              = m.regist_time,
                check_time               = m.regist_time
            };

            //hr.Major_change.Attach(mm);
            //hr.Entry(mm).State = System.Data.Entity.EntityState.Modified;
            //return hr.SaveChanges();
            hr.major_Changes.Add(mm);
            return(await hr.SaveChangesAsync());
        }
コード例 #10
0
 public ActionResult register(major_change t)
 {
     //major_change list = Mb.SelectWhere(t.mch_id).FirstOrDefault();
     //list.change_reason = t.change_reason;
     //list.check_status = t.check_status = 1;
     t.check_status = 0;
     t.regist_time  = DateTime.Now;
     if (Mb.Add(t) > 0)
     {
         return(Content("<script>window.location.href='/transfer/register_success'</script>"));
     }
     else
     {
         return(Content("<script>alert('添加失败');window.location.href='/transfer/register'</script>"));
     }
 }//调动登记的修改
コード例 #11
0
        public major_changeModel SelById(int id)
        {
            major_change      m  = hr.Set <major_change>().AsNoTracking().Where(e => e.mch_id == id).FirstOrDefault();
            major_changeModel mm = new major_changeModel()
            {
                mch_id                   = m.mch_id,
                first_kind_id            = m.first_kind_id,
                first_kind_name          = m.first_kind_name,
                second_kind_id           = m.second_kind_id,
                second_kind_name         = m.second_kind_name,
                third_kind_id            = m.third_kind_id,
                third_kind_name          = m.third_kind_name,
                major_id                 = m.major_id,
                major_name               = m.major_name,
                major_kind_id            = m.major_kind_id,
                major_kind_name          = m.major_kind_name,
                new_first_kind_id        = m.new_first_kind_id,
                new_first_kind_name      = m.new_first_kind_name,
                new_second_kind_id       = m.new_second_kind_id,
                new_second_kind_name     = m.new_second_kind_name,
                new_third_kind_id        = m.new_third_kind_id,
                new_third_kind_name      = m.new_third_kind_name,
                new_major_id             = m.new_major_id,
                new_major_name           = m.new_major_name,
                new_major_kind_id        = m.new_major_kind_id,
                new_major_kind_name      = m.new_major_kind_name,
                human_id                 = m.human_id,
                human_name               = m.human_name,
                salary_standard_id       = m.salary_standard_id,
                salary_standard_name     = m.salary_standard_name,
                salary_sum               = m.salary_sum,
                new_salary_standard_id   = m.new_salary_standard_id,
                new_salary_standard_name = m.new_salary_standard_name,
                new_salary_sum           = m.new_salary_sum,
                change_reason            = m.change_reason,
                check_reason             = m.check_reason,
                check_status             = m.check_status,
                register                 = m.register,
                checker                  = m.checker,
                regist_time              = m.regist_time,
                check_time               = m.regist_time
            };

            return(mm);
        }
コード例 #12
0
        /// <summary>
        /// 调动管理
        /// 调动管理查看
        /// </summary>
        /// <param name="id">根据id查询</param>
        /// <returns></returns>
        public ActionResult detail(int id)
        {
            List <major_change> list   = major.SelectWhere(e => e.mch_id == id);
            major_change        change = new major_change()
            {
                mch_id                   = list[0].mch_id,
                human_name               = list[0].human_name,               //姓名
                first_kind_id            = list[0].first_kind_id,            //一级编号
                first_kind_name          = list[0].first_kind_name,          //一级结构名称
                second_kind_id           = list[0].second_kind_id,           //二级编号
                second_kind_name         = list[0].second_kind_name,         //二级名字
                third_kind_id            = list[0].third_kind_id,            //三级编号
                third_kind_name          = list[0].third_kind_name,          //三级机构名称
                major_kind_id            = list[0].major_kind_id,            //职位分类编号
                major_kind_name          = list[0].major_kind_name,          //职位分类名称
                major_id                 = list[0].major_id,                 //职位编号
                major_name               = list[0].major_name,               //职位名称
                new_first_kind_id        = list[0].new_first_kind_id,        //新一级机构编号
                new_first_kind_name      = list[0].new_first_kind_name,      //新一级机构名称
                new_second_kind_id       = list[0].new_second_kind_id,       //新二级机构编号
                new_second_kind_name     = list[0].new_second_kind_name,     //新二级机构名称
                new_third_kind_id        = list[0].new_third_kind_id,        //新三级机构编号
                new_third_kind_name      = list[0].new_third_kind_name,      //新三级机构名称
                new_major_kind_id        = list[0].new_major_kind_id,        //新职位分类编号
                new_major_kind_name      = list[0].new_major_kind_name,      //新职位分类名称
                new_major_id             = list[0].new_major_id,             //新职位编号
                new_major_name           = list[0].new_major_name,           //新职位名称
                human_id                 = list[0].human_id,                 //人力资源档案编号
                salary_standard_id       = list[0].salary_standard_id,       //薪酬标准编号
                salary_standard_name     = list[0].salary_standard_name,     //薪酬标准名称
                salary_sum               = list[0].salary_sum,               //薪酬总额
                new_salary_standard_id   = list[0].new_salary_standard_id,   //新薪酬标准编号
                new_salary_standard_name = list[0].new_salary_standard_name, //新薪酬标准名称
                new_salary_sum           = list[0].new_salary_sum,           //新薪酬总额
                change_reason            = list[0].change_reason,            //调动原因
                check_reason             = list[0].check_reason,             //审核通过意见
                check_status             = list[0].check_status,             //复核通过状态
                register                 = list[0].register,                 //登记人
                checker                  = list[0].checker,                  //复核人
                regist_time              = list[0].regist_time,              //登记时间
                check_time               = list[0].check_time,               //复核时间
            };

            return(View(change));
        }
コード例 #13
0
        public ActionResult check(major_change t, int stus, int id)
        {
            major_change list = Mb.SelectWhere(t.mch_id).OrderBy(e => e.mch_id).LastOrDefault();

            list.regist_time = DateTime.Now;
            list.check_time  = DateTime.Now;
            if (stus > 0)
            {
                list.check_status = 1;
            }
            else
            {
                return(Content("<script>alert('您的复核意见不能通过');window.location.href='/transfer/check/" + id + "'</script>"));
            }

            if (Mb.Change(list) > 0)
            {
                return(Content("<script>window.location.href='/transfer/check_success'</script>"));
            }
            else
            {
                return(Content("<script>alert('修改失败');window.location.href='/transfer/check'</script>"));
            }
        }//调动审核的修改
コード例 #14
0
ファイル: major_changeService.cs プロジェクト: LiuDaShuaiBi/L
 public bool Del(major_change us)
 {
     return(ist.Del(us));
 }
コード例 #15
0
ファイル: transferController.cs プロジェクト: LiuDaShuaiBi/L
 public ActionResult check_success(major_change mc)
 {
     mcs.Upd(mc);
     return(View());
 }
コード例 #16
0
ファイル: MajorChangeBll.cs プロジェクト: SwagFly/tjxbd
 public int Del(major_change t)
 {
     return(dao.Del(t));
 }
コード例 #17
0
ファイル: MajorChangeBll.cs プロジェクト: SwagFly/tjxbd
 public int Change(major_change t)
 {
     return(dao.Change(t));
 }
コード例 #18
0
ファイル: MajorChangeBll.cs プロジェクト: SwagFly/tjxbd
 public int Add(major_change t)
 {
     return(dao.Add(t));
 }
コード例 #19
0
 public int Update(major_change mc)
 {
     return(ic.Update(mc));
 }
コード例 #20
0
ファイル: major_changeService.cs プロジェクト: LiuDaShuaiBi/L
 public major_change SelectOne(major_change us)
 {
     return(ist.SelectBy(e => e.mch_id == us.mch_id)[0]);
 }
コード例 #21
0
ファイル: major_changeService.cs プロジェクト: LiuDaShuaiBi/L
 public bool Upd(major_change us)
 {
     return(ist.Upd(us));
 }
コード例 #22
0
 public int Insert(major_change mc)
 {
     return(ic.Insert(mc));
 }
コード例 #23
0
 public int Updates(major_change change)
 {
     return(dao.Updates(change));
 }
コード例 #24
0
 public int Insert(major_change change)
 {
     return(dao.Insert(change));
 }
コード例 #25
0
 public bool DD(major_change mc, short id)
 {
     return(ist.updatahf(mc, id));
 }
コード例 #26
0
ファイル: major_changeService.cs プロジェクト: LiuDaShuaiBi/L
 public bool Add(major_change us)
 {
     return(ist.Add(us));
 }