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); }
/// <summary> /// 通过 Id 获取 /// </summary> /// <param name="id"></param> /// <returns></returns> public static PersonRepayment GetPersonRepayment(Guid id) { PersonRepayment obj = (PersonRepayment)MyHelper.XpoSession.GetObjectByKey(typeof(PersonRepayment), id); return(obj); }