Exemplo n.º 1
0
        public void AssignmentMustWorkForRec23()
        {
            var t   = _.t(new B0(), new B1(), new B2(), new B3(), new B4(), new B5(), new B6(), new B7(), new B8(), new B9(), new B10(), new B11(), new B12(), new B13(), new B14(), new B15(), new B16(), new B17(), new B18(), new B19(), new B20(), new B21(), new B22());
            A0  a0  = t._1;
            A1  a1  = t._2;
            A2  a2  = t._3;
            A3  a3  = t._4;
            A4  a4  = t._5;
            A5  a5  = t._6;
            A6  a6  = t._7;
            A7  a7  = t._8;
            A8  a8  = t._9;
            A9  a9  = t._10;
            A10 a10 = t._11;
            A11 a11 = t._12;
            A12 a12 = t._13;
            A13 a13 = t._14;
            A14 a14 = t._15;
            A15 a15 = t._16;
            A16 a16 = t._17;
            A17 a17 = t._18;
            A18 a18 = t._19;
            A19 a19 = t._20;
            A20 a20 = t._21;
            A21 a21 = t._22;
            A22 a22 = t._23;

            Assert.NotNull(a0);
            Assert.NotNull(a1);
            Assert.NotNull(a2);
            Assert.NotNull(a3);
            Assert.NotNull(a4);
            Assert.NotNull(a5);
            Assert.NotNull(a6);
            Assert.NotNull(a7);
            Assert.NotNull(a8);
            Assert.NotNull(a9);
            Assert.NotNull(a10);
            Assert.NotNull(a11);
            Assert.NotNull(a12);
            Assert.NotNull(a13);
            Assert.NotNull(a14);
            Assert.NotNull(a15);
            Assert.NotNull(a16);
            Assert.NotNull(a17);
            Assert.NotNull(a18);
            Assert.NotNull(a19);
            Assert.NotNull(a20);
            Assert.NotNull(a21);
            Assert.NotNull(a22);
        }
Exemplo n.º 2
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);
        }