private static ArrayList GetData(PrinterCondition pc) { ArrayList list = new ArrayList(); DataSet ds = SqlHelper.GetPrinterInformation(pc); int count = ds.Tables[0].Rows.Count; for (int i = 0; i < count; i++) { PrinterInformation printer = new PrinterInformation(); printer.StoreNo = ds.Tables[0].Rows[i]["storeNo"].ToString(); printer.StoreRegion = ds.Tables[0].Rows[i]["storeRegion"].ToString(); printer.StoreType = ds.Tables[0].Rows[i]["storeType"].ToString(); printer.PrinterStatus = ds.Tables[0].Rows[i]["printerStatus"].ToString(); printer.TonerStatus = ds.Tables[0].Rows[i]["tonerStatus"].ToString(); printer.PrinterType = ds.Tables[0].Rows[i]["printerType"].ToString(); printer.TonerType = ds.Tables[0].Rows[i]["tonerType"].ToString(); printer.Date = ds.Tables[0].Rows[i]["date"].ToString(); printer.PrinterNetwork = ds.Tables[0].Rows[i]["printerNetwork"].ToString(); list.Add(printer); } return(list); }
public void PrintPrivate(string jid, string user) { var printDocument = new Action<IEnumerable<PrintParser>>(ShowPrintDialogWithNotes); var conversation = App.controller.client.DetailsOf(jid); targetPageCount = conversation.Slides.Where(s => s.type == Slide.TYPE.SLIDE).Count(); targetParserCount = targetPageCount * 2; PrinterInfo = new PrinterInformation { parsers = new Dictionary<string, PrintParser>(), title = jid, slides = conversation.Slides }; foreach (var slide in conversation.Slides.Where(s => s.type == MeTLLib.DataTypes.Slide.TYPE.SLIDE).OrderBy(s => s.index)) { var room = slide.id; var parsers = new List<PrintParser>(); App.controller.client.historyProvider.Retrieve<PrintParser>( null, null, (parser) => ReceiveParser(parser, printDocument, room), room.ToString()); App.controller.client.historyProvider.RetrievePrivateContent<PrintParser>( null, null, (parser) => ReceiveParser(parser, printDocument, room), user, room.ToString()); } }