public List <cstPalletInfo> GetPalletInfoBySHNumber(String SHnumber) { List <cstPalletInfo> _lspallet = new List <cstPalletInfo>(); //cstPalletInfo palletInfo = new cstPalletInfo(); try { var pallet = entx3v6.ExecuteStoreQuery <cstPalletInfo>(@"select p.PalletNumber,p.PrintStatus from palletinfo p join PalletDetail pd on p.PalletID = pd.palletID where ShipmentNumber='" + SHnumber + "'group by p.PalletNumber,p.PrintStatus;").ToList(); foreach (var item in pallet) { cstPalletInfo _palletInfo = new cstPalletInfo(); _palletInfo.PrintStatus = item.PrintStatus; _palletInfo.PalletNumber = item.PalletNumber; //_lspallet _lspallet.Add(_palletInfo); } } catch (Exception) { } return(_lspallet); }
private void btnAddNewPallet_Click_1(object sender, RoutedEventArgs e) { cstPalletInfo _boxPackage = new cstPalletInfo(); _boxPackage.palletCreatedTime = DateTime.UtcNow; List <cstPalletInfo> lsBox = new List <cstPalletInfo>(); lsBox.Add(_boxPackage); Global.PalletID = Global.controller.SetPallet(lsBox); btnAddNewPallet.Visibility = Visibility.Hidden; }
private void Window_Loaded_1(object sender, RoutedEventArgs e) { try { cstPalletInfo _boxPackage = new cstPalletInfo(); _boxPackage.palletCreatedTime = DateTime.UtcNow; List <cstPalletInfo> lsBox = new List <cstPalletInfo>(); lsBox.Add(_boxPackage); Global.PalletID = Global.controller.SetPallet(lsBox); btnAddNewPallet.Visibility = Visibility.Hidden; fillGrid(Global.ShippingNumber); txtBoxNumberScanned.Focus(); txtWH.Text = CheckWH(Global.ShippingNumber).Trim(); } catch (Exception Ex) { ErrorLoger.save("wndBoxInfo - Page_load", "[" + DateTime.UtcNow.ToString() + "]" + Ex.ToString(), DateTime.UtcNow, Global.LoggedUserId); } }
public cstPalletInfo GetSelectedByPalletID(Guid PalletID) { cstPalletInfo _return = new cstPalletInfo(); try { PalletInfo _palletitem = entx3v6.PalletInfoes.SingleOrDefault(i => i.PalletID == PalletID); cstPalletInfo _pallet = new cstPalletInfo(); _pallet.PalletID = _pallet.PalletID;//Guid.NewGuid(); _pallet.PalletType = _palletitem.PalletType; _pallet.PalletWeight = Convert.ToDouble(_palletitem.PalletWeight); _pallet.PalletHeight = Convert.ToDouble(_palletitem.PalletHeight); _pallet.PalletWidth = Convert.ToDouble(_palletitem.PalletWidth); _pallet.palletCreatedTime = Convert.ToDateTime(_palletitem.palletCreatedTime); _pallet.RowID = _palletitem.RowID; _pallet.PrintStatus = _palletitem.PrintStatus; _pallet.PalletNumber = _palletitem.PalletNumber; _return = _pallet; } catch (Exception) { } return(_return); }