Exemplo n.º 1
0
        public Printer GetPrinterByName(string store_ID, string station_ID, string Name)
        {
            DataTable record = getGui.GetPrinterByName(StaticClass.storeId, StaticClass.stationId, Name);

            if (record.Rows.Count > 0)
            {
                string  PrinterName = record.Rows[0]["PrinterName"].ToString();
                string  NetworkPort = record.Rows[0]["NetworkPort"].ToString();
                string  Localport   = record.Rows[0]["LocalPort"].ToString();
                string  detail      = record.Rows[0]["Details"].ToString();
                bool    disable     = Convert.ToBoolean(record.Rows[0]["Disabled"]);
                bool    twoColor    = Convert.ToBoolean(record.Rows[0]["Two_Color_Printing"]);
                bool    cutPrint    = Convert.ToBoolean(record.Rows[0]["CutReceipt"]);
                Printer printer     = new Printer(PrinterName, Localport, NetworkPort, detail, disable, twoColor, cutPrint);
                return(printer);
            }
            return(null);
        }