Exemple #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            FrmKeyBoard frmKeyBoard = new FrmKeyBoard();

            if (frmKeyBoard.ShowDialog() == DialogResult.OK)
            {
                if (listBox1.Items.Contains(frmKeyBoard.value))
                {
                    Alert.Show("Mã này đã có rồi.", Color.Red);
                }
                else
                {
                    object[] station = new object[] { frmKeyBoard.value, StaticClass.storeId, "2", "1", "2", "0", "NONE", "NONE", "0", "NONEP", "NONE", "NONE", "NONE", "NONE"
                                                      , "N/A", "0", "NONE", true, true, "Y", "5", false, true, false, false, false, "0", "aaa",
                                                      "N/A", false, "1", true, "0", "sss", "0", "0", false, DateTime.Now, false, "0", "", "", "", "",
                                                      false, "0", "aaa", false, false, "0", "", "aaa", false, "1", "0", "0", false, "0", "NONE", "8421631",
                                                      false, "", 0, false, "1", true, false, "0", "0", false, false, false, false, false, "0", "0", false, "0", "0",
                                                      "aaa", "0", "0", false, false, "0", false, true, "NONEP", "", "", "0", "1", "1", "None", false, false, false, false, false,
                                                      "7", "0", "1", "1", 0, "NONE", "1", false, "1" };
                    getGui.InsertStation(station);
                    ArrayList printers = serviceGet.getPrinters(StaticClass.storeId, "01");
                    foreach (Printer o in printers)
                    {
                        serviceGet.InsertPrinter(o, frmKeyBoard.value);
                    }
                    listBox1.Items.Add(frmKeyBoard.value);
                }
            }
        }