SIMS 7 - Dinner Money - Opening Balance Export
Whilst there are probably a number of ways of finding the opening balances for dinner money, this mechanism is relatively straight forward.
The code behind this would be:
string wildcard = "%";
SIMS.Processes.DinnerMoney.EditStudentBalances esb = new SIMS.Processes.DinnerMoney.EditStudentBalances();
SIMS.Entities.DinnerMoney.SelectStudentsEventArgs args = new SIMS.Entities.DinnerMoney.SelectStudentsEventArgs(
wildcard,
wildcard,
true,
SIMS.Entities.DinnerMoney.Cache.StatusCurrentStudents,
SIMS.Entities.DinnerMoney.Cache.TierAny,
SIMS.Entities.DinnerMoney.Cache.YearGroupAny,
SIMS.Entities.DinnerMoney.Cache.RegistrationGroupAny,
SIMS.Entities.DinnerMoney.Cache.HouseAny,
DateTime.Now);
esb.Load(args);
foreach (SIMS.Entities.DinnerMoney.StudentBalance b in esb.StudentBalances )
{
double bal = b.OpeningBalanceAttribute.Value;
}