public static List<CurrentShowCost> GetUserShowChargeList(int ShowID, int UserID) { String moduleSettings = ModuleConfig.GetSettings(); Fpp.Data.Transaction t = new Fpp.Data.Transaction(moduleSettings); DataSet ds = t.getUserShowCharges(ShowID, UserID); List<CurrentShowCost> showCostsList = new List<CurrentShowCost>(); foreach (DataRow row in ds.Tables[0].Rows) { showCostsList.Add(new CurrentShowCost(row)); } return showCostsList; }
public static String GetUserShowCharges(int ShowID, int UserID) { String moduleSettings = ModuleConfig.GetSettings(); Fpp.Data.Transaction t = new Fpp.Data.Transaction(moduleSettings); DataSet ds = t.getUserShowCharges(ShowID, UserID); List<CurrentShowCost> showCostsList = new List<CurrentShowCost>(); foreach (DataRow row in ds.Tables[0].Rows) { showCostsList.Add(new CurrentShowCost(row)); } if (showCostsList.Count > 0) { return JsonConvert.SerializeObject(showCostsList); } else { return ""; } }