private void textBoxScanFrozen_KeyPress(object sender, KeyPressEventArgs e) { //when enter key is pressed //when item is scanned if (e.KeyChar == (char)Keys.Return) { e.Handled = true; coldroom client = new coldroom(); client = saveColdRoomInformation(comboBoxColdRoom.SelectedValue.ToString()); } }
private coldroom saveColdRoomInformation(string coldroomcode) { coldroom client = new coldroom(); client.code = coldroomcode; if (coldroomcode == MFD.code) { client.name = MFD.name; } else if (coldroomcode == BClimat.code) { client.name = BClimat.name; } return(client); }