public static TransactionSummary getTransactionSummary(int ShowID, int UserID) { String moduleSettings = ModuleConfig.GetSettings(); Fpp.Data.Transaction t = new Fpp.Data.Transaction(moduleSettings); DataSet ds = t.getTransactionSummary(ShowID, UserID); if (ds.Tables[0].Rows.Count > 0) { return new TransactionSummary(ds.Tables[0].Rows[0]); } else { return new TransactionSummary(); } }
public TransactionSummary(int ShowID, int UserID) : base() { String moduleSettings = ModuleConfig.GetSettings(); Fpp.Data.Transaction t = new Fpp.Data.Transaction(moduleSettings); DataSet ds = t.getTransactionSummary(ShowID, UserID); if (ds.Tables[0].Rows.Count > 0) { LoadFromRow(ds.Tables[0].Rows[0]); } }