public void DisplayInBoardTwo(Batch pObjbatch) { try { //string lStrClassif = pObjbatch.BuyerClassificationId != null && pObjbatch.BuyerClassificationId > 0 // ? GetCustomerClassificationCode((long)pObjbatch.BuyerClassificationId).ToString() : string.Empty; if (mBolBoardLoaded) { string lStrClassificationCode = pObjbatch.BuyerClassificationId != null && pObjbatch.BuyerClassificationId > 0 ? GetCustomerClassificationCode((long)pObjbatch.BuyerClassificationId).ToString() : string.Empty; mObjBoardServer.WriteDisplayTwo ( pObjbatch.Number.ToString(), pObjbatch.Quantity, pObjbatch.Weight, pObjbatch.AverageWeight, //(pObjbatch.Buyer != null ? // (pObjbatch.Buyer.Code.Length > 3 ? // pObjbatch.Buyer.Code.Substring(pObjbatch.Buyer.Code.Length - 3, 3) : // pObjbatch.Buyer.Code // ) : // string.Empty //), (!string.IsNullOrEmpty(lStrClassificationCode)? ( lStrClassificationCode.Length > 3 ? lStrClassificationCode.Substring(lStrClassificationCode.Length - 3, 3) : lStrClassificationCode ) : string.Empty ), (pObjbatch.Price > 999 ? pObjbatch.Price / 10 : pObjbatch.Price ) ); } else { ShowMessage("Pantalla 2", "La pantalla no se encuentra conectada."); } } catch (Exception lObjException) { ShowMessage("Pantalla 2", lObjException.Message); } }
private void btnSendDisplay2_Click(object sender, RoutedEventArgs e) { try { mObjBoards.WriteDisplayTwo( txtBatchNum_Display2.Text, txtHeadsNum_Display2.Text, txtTotalWeight_Display2.Text, txtAverageWeight_Display2.Text, txtBuyerNum_Display2.Text, txtPrice_Display2.Text); } catch (Exception lObjException) { CustomMessageBox.Show("Error", lObjException.Message); } }