Exemplo n.º 1
0
        public static PersonBorrow AddPersonBorrow(string empNo, string itemName, DateTime effDt)
        {
            PersonBorrow item = GetPersonBorrow(empNo, itemName, effDt);

            if (item == null)
            {
                item      = new PersonBorrow();
                item.标识   = Guid.NewGuid();
                item.员工编号 = empNo;
                item.项目   = itemName;
                item.生效日期 = effDt;
                item.Save();
            }
            return(item);
        }
        public static PersonRepayment AddPersonRepayment(PersonBorrow borrow, int year, int month)
        {
            PersonRepayment item = GetPersonRepayment(borrow.标识, year, month);

            if (item == null)
            {
                item        = new PersonRepayment();
                item.标识     = Guid.NewGuid();
                item.借款记录标识 = borrow.标识;
                item.项目     = borrow.项目;
                item.年      = year;
                item.月      = month;
                item.姓名     = borrow.姓名;
                item.员工编号   = borrow.员工编号;
                item.Save();
            }
            return(item);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 通过 Id 获取
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public static PersonBorrow GetPersonBorrow(Guid id)
        {
            PersonBorrow obj = (PersonBorrow)MyHelper.XpoSession.GetObjectByKey(typeof(PersonBorrow), id);

            return(obj);
        }