Пример #1
0
        /// <summary>
        /// 修改学历学位信息
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public bool EditEdu(object obj)
        {
            A01BLL          _aBll = new A01BLL();
            SM_CodeItemsBLL item  = new SM_CodeItemsBLL();
            FormCollection  param = (FormCollection)obj;
            A04             a     = new A04();

            a.PersonID = _aBll.GetByRowID(param["EduRowID"]).PersonID;
            if (!string.IsNullOrEmpty(param["A0405"]))
            {
                a.A0405 = item.GetCodeItemByCodeID("JDXL").Where(o => o.CodeItemName == param["A0405"]).FirstOrDefault().CodeItemID;
            }
            if (!string.IsNullOrEmpty(param["C0401"]))
            {
                a.C0401 = item.GetCodeItemByCodeID("KF").Where(o => o.CodeItemName == param["C0401"]).FirstOrDefault().CodeItemID;
            }
            a.DispOrder = GetA04Info().Count() + 1;
            a.IsLastRow = 1;
            if (!string.IsNullOrEmpty(param["A0415"]))
            {
                a.A0415 = Convert.ToDateTime(param["A0415"]);
            }
            if (!string.IsNullOrEmpty(param["A0430"]))
            {
                a.A0430 = Convert.ToDateTime(param["A0430"]);
            }
            a.A0435 = param["A0435"];
            a.A0410 = param["A0410"];
            string RowID = param["EduRowID"];

            return(base.Modify(a, o => o.RowID == RowID, "A0405", "C0401", "A0415", "A0430", "A0435", "A0410") > 0);
        }
Пример #2
0
        /// <summary>
        /// 添加学历学位信息
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public bool AddEdu(object obj)
        {
            A01BLL          _aBll = new A01BLL();
            SM_CodeItemsBLL item  = new SM_CodeItemsBLL();
            FormCollection  param = (FormCollection)obj;
            A04             a     = new A04();

            a.PersonID = _aBll.GetByRowID(param["EduRowID"]).PersonID;
            a.RowID    = HCQ2_Common.RowIDHelp.GetNewRowID();
            if (!string.IsNullOrEmpty(param["A0405"]))
            {
                a.A0405 = item.GetCodeItemByCodeID("JDXL").Where(o => o.CodeItemName == param["A0405"]).FirstOrDefault().CodeItemID;
            }
            if (!string.IsNullOrEmpty(param["C0401"]))
            {
                a.C0401 = item.GetCodeItemByCodeID("KF").Where(o => o.CodeItemName == param["C0401"]).FirstOrDefault().CodeItemID;
            }
            a.IsLastRow = 1;
            if (!string.IsNullOrEmpty(param["A0415"]) && param["A0415"] != "学历学位")
            {
                a.A0415 = Convert.ToDateTime(param["A0415"]);
            }
            if (!string.IsNullOrEmpty(param["A0430"]) && param["A0430"] != "A0430")
            {
                a.A0430 = Convert.ToDateTime(param["A0430"]);
            }
            a.A0435 = param["A0435"];
            a.A0410 = param["A0410"];

            bool isAccess = false;

            if (!string.IsNullOrEmpty(param["EduIsEdit"]))
            {
                //编辑
                string EduRowID = param["EduIsEdit"];
                isAccess = base.Modify(a, o => o.RowID == EduRowID, "A0405", "C0401", "A0415", "A0430", "A0435", "A0410") > 0;
            }
            else
            {
                var data = GetA04Info();
                if (data.Count() > 0)
                {
                    a.DispOrder = data.Max(o => o.DispOrder) + 1;
                }
                else
                {
                    a.DispOrder = 1;
                }

                //添加
                isAccess = base.Add(a) > 0;
            }

            return(isAccess);
        }
Пример #3
0
        /// <summary>
        /// 保存或者编辑工作经历
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public bool OperWork(object obj)
        {
            FormCollection param = (FormCollection)obj;
            A19            a     = new A19();

            a.IsLastRow = 1;

            if (!string.IsNullOrEmpty(param["A1905"]))
            {
                a.A1905 = Convert.ToDateTime(param["A1905"]);
            }
            if (!string.IsNullOrEmpty(param["A1910"]))
            {
                a.A1910 = Convert.ToDateTime(param["A1910"]);
            }
            a.A1915 = param["A1915"];
            a.A1920 = param["A1920"];
            a.A1925 = param["A1925"];
            a.A1926 = param["A1926"];
            a.A1927 = param["A1927"];
            a.A1928 = param["A1928"];
            a.A1929 = param["A1929"];
            a.A1930 = param["A1930"];

            bool returnBool = false;

            if (!string.IsNullOrEmpty(param["workIsEdit"]))
            {
                //编辑
                string workEditRowID = param["workIsEdit"];
                returnBool = base.Modify(a, o => o.RowID == workEditRowID, "A1905", "A1910", "A1915", "A1920", "A1925"
                                         , "A1926", "A1927", "A1928", "A1929", "A1930") > 0;
            }
            else
            {
                A01BLL _aBll = new A01BLL();
                a.RowID    = HCQ2_Common.RowIDHelp.GetNewRowID();
                a.PersonID = _aBll.GetByRowID(param["workRowID"]).PersonID;
                if (GetA19Info().Count() > 0)
                {
                    a.DispOrder = GetA19Info().Max(o => o.DispOrder) + 1;
                }
                else
                {
                    a.DispOrder = 1;
                }
                returnBool = base.Add(a) > 0;
            }

            return(returnBool);
        }
Пример #4
0
        /// <summary>
        /// 添加、编辑考勤时间
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public bool OperAttendance(object obj)
        {
            FormCollection param = (FormCollection)obj;
            A01BLL         aBll  = new A01BLL();
            A02            a     = new A02();

            a.A0201 = Convert.ToDateTime(param["A0201"]);

            bool returnBool = false;

            if (!string.IsNullOrEmpty(param["AttendanceIsEdit"]))
            {
                string RowID = param["AttendanceIsEdit"];
                returnBool = base.Modify(a, o => o.RowID == RowID, "A0201") > 0;
            }
            else
            {
                string RowID = param["AttendanceRowID"];
                a.PersonID = aBll.GetByRowID(RowID).PersonID;
                if (UpdateA02LastRow(a.PersonID))
                {
                    a.RowID     = HCQ2_Common.RowIDHelp.GetNewRowID();
                    a.IsLastRow = 1; var data = GetA02Info();
                    if (data.Count() > 0)
                    {
                        a.DispOrder = data.Count() + 1;
                    }
                    else
                    {
                        a.DispOrder = 1;
                    }
                    returnBool = base.Add(a) > 0;
                }
                else
                {
                    returnBool = false;
                }
            }
            return(returnBool);
        }