示例#1
0
        private void saveRoute_Click(object sender, EventArgs e)
        {
            prefetch = false;
            for (int i = 0; i < workOrderTable.SelectedRows.Count; i++)
            {
                int check = 0;
                DataGridViewCheckBoxCell ch = (DataGridViewCheckBoxCell)workOrderTable.SelectedRows[i].Cells[0];
                if (ch.Value != null)
                {
                    if ((bool)ch.Value)
                    {
                        check = 1;
                    }
                }
                if (check == 1)
                {
                    new SalesOrder().setDone(workOrderTable.SelectedRows[i].Cells[1].Value.ToString());
                }
            }

            for (int i = 0; i < servicesTable.SelectedRows.Count; i++)
            {
                int check = 0;
                DataGridViewCheckBoxCell ch = (DataGridViewCheckBoxCell)servicesTable.SelectedRows[i].Cells[0];
                if (ch.Value != null)
                {
                    if ((bool)ch.Value)
                    {
                        check = 1;
                    }
                }
                Itinerary it = new Itinerary();

                if (check == 1)
                {
                    it.complete(new ClientContract().getServiceID(userid.ToString(),
                                                                  servicesTable.SelectedRows[i].Index), servicesTable.SelectedRows[i].Cells[3].Value.ToString());
                }
            }
            this.Close();
        }
示例#2
0
        private void saveRoute_Click(object sender, EventArgs e)
        {
            prefetch = false;
            for (int i = 0; i < workOrderTable.SelectedRows.Count; i++)
            {
                int check = 0;
                DataGridViewCheckBoxCell ch = (DataGridViewCheckBoxCell)workOrderTable.SelectedRows[i].Cells[0];
                if (ch.Value != null)
                {
                    if ((bool)ch.Value)
                    {
                        check = 1;
                    }

                }
                if (check == 1)
                    new SalesOrder().setDone(workOrderTable.SelectedRows[i].Cells[1].Value.ToString());
            }

            for (int i = 0; i < servicesTable.SelectedRows.Count; i++)
            {
                int check = 0;
                DataGridViewCheckBoxCell ch = (DataGridViewCheckBoxCell)servicesTable.SelectedRows[i].Cells[0];
                if (ch.Value != null)
                {
                    if ((bool)ch.Value)
                    {
                        check = 1;
                    }

                }
                Itinerary it = new Itinerary();

                if (check == 1)
                    it.complete(new ClientContract().getServiceID(userid.ToString(),
                        servicesTable.SelectedRows[i].Index), servicesTable.SelectedRows[i].Cells[3].Value.ToString());

            }
            this.Close();
        }