Пример #1
0
        public void GetEnviosByShipment(string shipmentCode)
        {
            BoxsShipment = ShipmentBusiness.GetCajasByshipmentCode(shipmentCode);
            dataBox.AutoGenerateColumns = false;
            dataBox.DataSource          = BoxsShipment;
            dataBox.ClearSelection();

            lblTotalKilosBruto.Text = BoxsShipment.Sum(p => decimal.Parse(p.pesoBruto, CultureInfo.InvariantCulture.NumberFormat)).ToString("0.00");
            lblTotalKilosNeto.Text  = BoxsShipment.Sum(p => decimal.Parse(p.pesoNeto, CultureInfo.InvariantCulture.NumberFormat)).ToString("0.00");
        }
Пример #2
0
        private void borrarShipmentToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var obj          = BuscaShipment();
            var id           = Convert.ToInt32(obj.Cells["Id"].Value);
            var shipmentCode = Convert.ToString(obj.Cells["Code"].Value);
            var count        = ShipmentBusiness.GetCajasByshipmentCode(shipmentCode).Count;

            if (count > 0)
            {
                MessageBox.Show("Shipment posee cajas asignadas, imposible eliminar!", "Módulo Creación Shipment", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                return;
            }

            BorrarShipment(id);
            LlenaGrilla(dtpFechaEnvio.Value.Date);
            lblShipmentCode.Text = "";
            ActualizaShipments();
            dtpFechaEnvio.Focus();
        }