예제 #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            ArrayList a        = new ArrayList(Printers.Values);
            DataTable stations = getGui.GetAllStation(StaticClass.storeId);

            foreach (Printer c in a)
            {
                if (c.isNew)
                {
                    if (!c.isDelete)
                    {
                        for (int i = 0; i < stations.Rows.Count; i++)
                        {
                            serviceGet.InsertPrinter(c, stations.Rows[i]["Station_ID"].ToString());
                        }
                    }
                }
                else if (c.isDelete)
                {
                    for (int i = 0; i < stations.Rows.Count; i++)
                    {
                        getGui.DeletePrinter(StaticClass.storeId, stations.Rows[i]["Station_ID"].ToString(), c.PrinterName);
                    }
                }
                else
                {
                    getGui.UpdatePrinter(StaticClass.storeId, StaticClass.stationId, c.PrinterName, c.Disable, c.Two_Color, c.Cut_Print, c.LocalPort, c.NetworkPort, c.Details);
                }
            }
            this.Dispose();
        }
예제 #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            ArrayList a = new ArrayList(Printers.Values);

            foreach (Printer c in a)
            {
                if (c.isNew)
                {
                    if (!c.isDelete)
                    {
                        serviceGet.InsertPrinter(c);
                    }
                }
                else if (c.isDelete)
                {
                    getGui.DeletePrinter(StaticClass.storeId, StaticClass.stationId, c.PrinterName);
                }
                else
                {
                    getGui.UpdatePrinter(StaticClass.storeId, StaticClass.stationId, c.PrinterName, c.Disable, c.Two_Color, c.Cut_Print, c.LocalPort, c.NetworkPort, c.Details);
                }
            }
            this.Dispose();
        }