public void GetShipmentCode() { var data = ShipmentBusiness.GetShipmentCode(); cboShipment.DisplayMember = "ShipmentCode"; cboShipment.ValueMember = "ShipmentCode"; cboShipment.DataSource = data; }
private void ActualizaShipments() { FrmEnvioCaja frm = (FrmEnvioCaja)Application.OpenForms["FrmEnvioCaja"]; //GroupBox grp = (GroupBox)frm.Controls["grpLocation"]; ComboBox cb = (ComboBox)frm.Controls["cboShipment"]; DataGridView dg = (DataGridView)frm.Controls["dataBox"]; var data = ShipmentBusiness.GetShipmentCode(); cb.ValueMember = "ShipmentCode"; cb.DisplayMember = "ShipmentCode"; cb.DataSource = data; dg.DataSource = null; frm.LimpiarFormulario(true); //Lbl Label lbl = (Label)frm.Controls["lblTotalKilosNeto"]; lbl.Text = ""; lbl = (Label)frm.Controls["lblTotalKilosBruto"]; lbl.Text = ""; }