Пример #1
0
        private void UpdateView()
        {
            CrystalHost.HostServiceClient hsc = new CRySTALClient.CrystalHost.HostServiceClient();
            Dictionary<CrystalHost.TableTypes, int[]> tableStatus;
            tableStatus = hsc.GetTables(sessionID);
            foreach (int i in tableStatus[CRySTALClient.CrystalHost.TableTypes.Clean])
            {

                 if (i < 6)   tableButtons[i - 1].BackColor = Color.LightGreen;
            }
            foreach (int i in tableStatus[CRySTALClient.CrystalHost.TableTypes.InUse])
            {
                if (i < 6) tableButtons[i - 1].BackColor = Color.LightBlue;
            }
            foreach (int i in tableStatus[CRySTALClient.CrystalHost.TableTypes.Dirty])
            {
                if (i < 6) tableButtons[i - 1].BackColor = Color.Red;
            }
            foreach (int i in tableStatus[CRySTALClient.CrystalHost.TableTypes.Cleaning])
            {
                if (i < 6) tableButtons[i - 1].BackColor = Color.Orange;
            }
            foreach (int i in tableStatus[CRySTALClient.CrystalHost.TableTypes.CannotBeUsed])
            {
                if (i < 6) tableButtons[i - 1].BackColor = Color.Gray;
            }
            hsc.Close();
        }
Пример #2
0
 private void SelectWaiter_Load(object sender, EventArgs e)
 {
     CrystalHost.HostServiceClient cli = new CRySTALClient.CrystalHost.HostServiceClient();
     lst = cli.GetWaitersOnDuty(sessionID);
     foreach (CrystalHost.BasicEmployee emp in lst)
     {
         listBox1.Items.Add(emp.name + "(" + emp.id.ToString() + ")");
     }
 }
Пример #3
0
 void bnt_Click(object sender, EventArgs e)
 {
     int id = int.Parse((sender as Button).Tag.ToString());
     SelectWaiter sw = new SelectWaiter(sessionID);
     if (sw.ShowDialog() == DialogResult.OK)
     {
         CrystalHost.HostServiceClient cli = new CRySTALClient.CrystalHost.HostServiceClient();
         cli.AssignTableTo(sessionID, id, sw.SelEmployee.id);
     }
 }