public static PersonReimbursement AddPersonReimbursement(string empNo, string itemName, int year, int month) { PersonReimbursement item = GetPersonReimbursement(empNo, itemName, year, month); if (item == null) { item = new PersonReimbursement(); item.标识 = Guid.NewGuid(); item.员工编号 = empNo; item.项目 = itemName; item.年 = year; item.月 = month; item.Save(); } return(item); }
/// <summary> /// 通过 Id 获取 /// </summary> /// <param name="id"></param> /// <returns></returns> public static PersonReimbursement GetPersonReimbursement(Guid id) { PersonReimbursement obj = (PersonReimbursement)MyHelper.XpoSession.GetObjectByKey(typeof(PersonReimbursement), id); return(obj); }