Esempio n. 1
0
        //read shipments ready to be shippped
        private void ReadCurrentShipments()
        {
            listViewCurrentShipment.Items.Clear();

            sol_ShipmentList = sol_Shipment_Sp.SelectAllByStatus("I", true);  //all InProgress StagedContainers
            if (sol_ShipmentList == null)
            {
                return;
            }

            foreach (Sol_Shipment ss in sol_ShipmentList)
            {
                addItemShipment(ss.RBillNumber, ss.AgencyName);
            }
            labelCurrentShipmentsCount.Text = String.Format("Count:" + Funciones.Indent(2) + "{0,10:##,###,##0}", listViewCurrentShipment.Items.Count);
        }
Esempio n. 2
0
        //read shipments with adjustments
        private void ReadCurrentShipments()
        {
            int selectedRow = -1;

            try
            {
                selectedRow = dataGridViewCurrentShipment.SelectedRows[0].Index;
            }
            catch { }


            this.dataGridViewCurrentShipment.SelectionChanged -= new System.EventHandler(this.dataGridViewCurrentShipment_SelectionChanged);
            dataGridViewCurrentShipment.Rows.Clear();
            this.dataGridViewCurrentShipment.SelectionChanged += new System.EventHandler(this.dataGridViewCurrentShipment_SelectionChanged);

            listViewContainersOnShipment.Items.Clear();

            sol_ShipmentList = sol_Shipment_Sp.SelectAllByStatus("A", true);

            if (sol_ShipmentList == null)
            {
                return;
            }

            foreach (Sol_Shipment ss in sol_ShipmentList)
            {
                dataGridViewCurrentShipment.Rows.Add(ss.RBillNumber, ss.AgencyName, ss.Date.ToShortDateString(), ss.Status, ss.ERBillTransmitted, ss.ShipmentID);
            }
            //select pre-selected row if any
            if (selectedRow > 0)    //-1)
            {
                dataGridViewCurrentShipment.Rows[selectedRow].Selected = true;
            }

            labelCurrentShipmentsCount.Text = String.Format("Count:" + Funciones.Indent(2) + "{0,10:##,###,##0}", dataGridViewCurrentShipment.Rows.Count);
        }
Esempio n. 3
0
        //read shipments
        private void ReadCurrentShipments()
        {
            int selectedRow = -1;

            try
            {
                selectedRow = dataGridViewCurrentShipment.SelectedRows[0].Index;
            }
            catch { }

            dataGridViewCurrentShipment.Rows.Clear();

            listViewContainersOnShipment.Items.Clear();

            if (checkBoxDates.Checked)
            {
                string status = "";
                if (radioButtonInProgress.Checked)
                {
                    status = "I";
                }
                else if (radioButtonShipped.Checked)
                {
                    status = "S";
                }

                string dateFrom = dateTimePickerFrom.Value.ToString("yyyy-MM-dd") + " 00:00:00"; // hh:mm:ss");
                string dateTo   = dateTimePickerTo.Value.ToString("yyyy-MM-dd") + " 23:59:59";   // hh:mm:ss");

                sol_ShipmentList = sol_Shipment_Sp.SelectAllBetweenDatesByStatus(
                    //dateTimePickerFrom.Value, dateTimePickerTo.Value,
                    dateFrom, dateTo,
                    status, true);
            }
            else
            {
                if (radioButtonAll.Checked)
                {
                    sol_ShipmentList = sol_Shipment_Sp.SelectAll(true);
                }
                else
                {
                    string status = "";
                    if (radioButtonInProgress.Checked)
                    {
                        status = "I";
                    }
                    else if (radioButtonShipped.Checked)
                    {
                        status = "S";
                    }
                    sol_ShipmentList = sol_Shipment_Sp.SelectAllByStatus(status, true);
                }
            }

            if (sol_ShipmentList == null ||
                sol_ShipmentList.Count < 1)
            {
                return;
            }

            foreach (Sol_Shipment ss in sol_ShipmentList)
            {
                dataGridViewCurrentShipment.Rows.Add(ss.RBillNumber, ss.AgencyName, ss.Date.ToShortDateString(), ss.Status, ss.ERBillTransmitted, ss.ShipmentID);
            }
            //select pre-selected row if any
            if (selectedRow > 0)    //-1)
            {
                try
                {
                    dataGridViewCurrentShipment.Rows[selectedRow].Selected = true;
                }
                catch { }
            }

            labelCurrentShipmentsCount.Text = String.Format("Count:" + Funciones.Indent(2) + "{0,10:##,###,##0}", dataGridViewCurrentShipment.Rows.Count);
        }