Пример #1
0
        public ActionResult Add()
        {
            engage_major_release_Model e = new engage_major_release_Model()
            {
                first_kind_id    = Request["first_kind_id"],
                first_kind_name  = Request["first_kind_name"],
                second_kind_id   = Request["second_kind_id"],
                second_kind_name = Request["second_kind_name"],
                third_kind_id    = Request["third_kind_id"],
                third_kind_name  = Request["third_kind_name"],
                engage_type      = Request["engage_type"],
                major_kind_id    = Request["major_kind_id"],
                major_kind_name  = Request["major_kind_name"],
                major_id         = Request["major_id"],
                major_name       = Request["major_name"],
                human_amount     = int.Parse(Request["human_amount"]),
                deadline         = DateTime.Parse(Request["deadline"]),
                register         = Request["register"],
                regist_time      = DateTime.Parse(Request["regist_time"]),
                major_describe   = Request["major_describe"],
                engage_required  = Request["engage_required"],
                changer          = null,
                change_time      = DateTime.Parse("2000-01-01 00:00:00")
            };

            if (R.engage_major_releaseAdd(e) > 0)
            {
                return(Content("alert('新增成功');window.location.href='/position_register/Index'"));
            }
            else
            {
                return(Content("alert('新增失败');window.location.href='/position_register/Index'"));
            }
        }
Пример #2
0
        public ActionResult Update1()
        {
            engage_major_release_Model e = new engage_major_release_Model();

            e.first_kind_id    = Request["first_kind_id"];
            e.first_kind_name  = Request["first_kind_name"];
            e.second_kind_id   = Request["second_kind_id"];
            e.second_kind_name = Request["second_kind_name"];
            e.third_kind_id    = Request["third_kind_id"];
            e.third_kind_name  = Request["third_kind_name"];
            e.engage_type      = Request["engageType"];
            e.major_kind_id    = Request["major_kind_id"];
            e.major_kind_name  = Request["major_kind_name"];
            e.major_id         = Request["major_id"];
            e.major_name       = Request["major_name"];
            e.human_amount     = int.Parse(Request["human_amount"]);
            e.deadline         = DateTime.Parse(Request["deadline"]);
            e.register         = Request["register"];
            e.regist_time      = DateTime.Parse(Request["regist_time"]);
            e.major_describe   = Request["major_describe"];
            e.engage_required  = Request["engage_required"];
            e.changer          = Request["changer"];
            e.mre_id           = int.Parse(Request["mre_id"]);
            e.change_time      = DateTime.Parse(Request["changeTime"]);
            int i = mr.engage_major_releaseUpdate(e);

            if (i > 0)
            {
                return(Content("<script>alert('修改成功');window.location.href ='/position_change_update/Index';</script>"));
            }
            else
            {
                return(Content("<script>alert('修改失败');window.location.href ='/position_change_update/Update';</script>"));
            }
        }
Пример #3
0
        public engage_major_release_Model engage_major_releaseSelect(engage_major_release_Model e1)
        {
            List <engage_major_release> list = SelectBy(e => e.mre_id.Equals(e1.mre_id));
            engage_major_release        r    = list[0];
            engage_major_release_Model  m    = new engage_major_release_Model()
            {
                first_kind_id    = r.first_kind_id,
                first_kind_name  = r.first_kind_name,
                second_kind_id   = r.second_kind_id,
                second_kind_name = r.second_kind_name,
                third_kind_id    = r.third_kind_id,
                third_kind_name  = r.third_kind_name,
                engage_type      = r.engage_type,
                major_kind_id    = r.major_kind_id,
                major_kind_name  = r.major_kind_name,
                major_name       = r.major_name,
                human_amount     = r.human_amount,
                deadline         = r.deadline,
                register         = r.register,
                regist_time      = r.regist_time,
                major_describe   = r.major_describe,
                engage_required  = r.engage_required,
                major_id         = r.major_id,
                mre_id           = r.mre_id,
                changer          = r.changer,
                change_time      = r.change_time
            };

            return(m);
        }
Пример #4
0
 public int engage_major_releaseDelete(engage_major_release_Model e)
 {
     return(Delete(new engage_major_release()
     {
         mre_id = e.mre_id
     }));
 }
Пример #5
0
        public int engage_major_releaseAdd(engage_major_release_Model e)
        {
            engage_major_release E1 = new engage_major_release()
            {
                first_kind_id    = e.first_kind_id,
                first_kind_name  = e.first_kind_name,
                second_kind_id   = e.second_kind_id,
                second_kind_name = e.second_kind_name,
                third_kind_id    = e.third_kind_id,
                third_kind_name  = e.third_kind_name,
                engage_type      = e.engage_type,
                major_kind_id    = e.major_kind_id,
                major_kind_name  = e.major_kind_name,
                major_name       = e.major_name,
                human_amount     = e.human_amount,
                deadline         = e.deadline,
                register         = e.register,
                regist_time      = e.regist_time,
                major_describe   = e.major_describe,
                engage_required  = e.engage_required,
                major_id         = e.major_id,
                changer          = e.changer,
                change_time      = e.change_time
            };

            return(Add(E1));
        }
Пример #6
0
        public int engage_major_releaseUpdate(engage_major_release_Model r)
        {
            engage_major_release m = new engage_major_release()
            {
                first_kind_id    = r.first_kind_id,
                first_kind_name  = r.first_kind_name,
                second_kind_id   = r.second_kind_id,
                second_kind_name = r.second_kind_name,
                third_kind_id    = r.third_kind_id,
                third_kind_name  = r.third_kind_name,
                engage_type      = r.engage_type,
                major_kind_id    = r.major_kind_id,
                major_kind_name  = r.major_kind_name,
                major_name       = r.major_name,
                human_amount     = r.human_amount,
                deadline         = r.deadline,
                register         = r.register,
                regist_time      = r.regist_time,
                major_describe   = r.major_describe,
                engage_required  = r.engage_required,
                major_id         = r.major_id,
                mre_id           = r.mre_id,
                changer          = r.changer,
                change_time      = r.change_time
            };

            return(Update(m));
        }
Пример #7
0
        public ActionResult Delete(int id)
        {
            int mre_id = id;
            engage_major_release_Model em = new engage_major_release_Model()
            {
                mre_id = mre_id
            };

            return(Content(mr.engage_major_releaseDelete(em).ToString()));
        }
        public ActionResult Update(int id)
        {
            int mre_id = id;
            engage_major_release_Model em = new engage_major_release_Model()
            {
                mre_id = mre_id
            };
            engage_major_release_Model e = mr.engage_major_releaseSelect(em);

            return(View(e));
        }
Пример #9
0
        public ArrayList engage_major_releaseSelectFenY(int Dq, int pageSize)
        {
            int row = 0;
            List <engage_major_release_Model> list1 = new List <engage_major_release_Model>();
            List <engage_major_release>       list  = new List <engage_major_release>();

            list = FenYe <int>(e => e.mre_id, e => e.mre_id > 0, ref row, Dq, pageSize);
            foreach (var item in list)
            {
                engage_major_release_Model e = new engage_major_release_Model()
                {
                    first_kind_id    = item.first_kind_id,
                    first_kind_name  = item.first_kind_name,
                    second_kind_id   = item.second_kind_id,
                    second_kind_name = item.second_kind_name,
                    third_kind_id    = item.third_kind_id,
                    third_kind_name  = item.third_kind_name,
                    engage_type      = item.engage_type,
                    major_kind_id    = item.major_kind_id,
                    major_kind_name  = item.major_kind_name,
                    major_name       = item.major_name,
                    human_amount     = item.human_amount,
                    deadline         = item.deadline,
                    register         = item.register,
                    regist_time      = item.regist_time,
                    major_describe   = item.major_describe,
                    engage_required  = item.engage_required,
                    major_id         = item.major_id,
                    mre_id           = item.mre_id
                };
                list1.Add(e);
            }
            ArrayList A = new ArrayList();

            A.Add(list1);
            A.Add(row);
            A.Add(Dq);
            A.Add(pageSize);
            A.Add((row - 1) / pageSize + 1);
            return(A);
        }
Пример #10
0
 public int engage_resumeAddSelect(engage_major_release_Model r)
 {
     return(EM.engage_resumeAddSelect(r));
 }
Пример #11
0
 public int engage_major_releaseUpdate(engage_major_release_Model r)
 {
     return(EM.engage_major_releaseUpdate(r));
 }
Пример #12
0
 public engage_major_release_Model engage_major_releaseSelect(engage_major_release_Model e1)
 {
     return(EM.engage_major_releaseSelect(e1));
 }
Пример #13
0
 public int engage_major_releaseDelete(engage_major_release_Model e)
 {
     return(EM.engage_major_releaseDelete(e));
 }
Пример #14
0
        public int engage_resumeAddSelect(engage_major_release_Model r)
        {
            string sql = string.Format("select count(*) from engage_major_release where [major_kind_id]={0} and [major_id]={1} and [engage_type]='{2}'", r.major_kind_id, r.major_id, r.engage_type);

            return(int.Parse(SqlDBHelper.DGZ(sql).ToString()));
        }