コード例 #1
0
 public void PrepareNewRecord()
 {
     saveSimpleButton.Tag     = null;
     editSimpleButton.Tag     = null;
     descriptionMemoEdit.Text = null;
     if (DateTime.Now.TimeOfDay < new TimeSpan(9, 0, 0))
     {
         adjustmentDateEdit.DateTime = DateTime.Today.AddDays(-1);
     }
     else
     {
         adjustmentDateEdit.DateTime = DateTime.Today;
     }
     itemLookUpEdit.EditValue     = null;
     originalQtyTextEdit.Text     = null;
     newQtyTextEdit.Text          = null;
     customerLookUpEdit.EditValue = null;
     reasonMemoExEdit.EditValue   = null;
     locationLookUpEdit.EditValue = UsersBLL.GetUsersLocalLocation(Session.DefaultSession, Properties.Settings.Default.UserName).Oid;
     lpnLookUpEdit.Text           = "";
     originalLotLookUpEdit.Text   = "";
     newLotTextEdit.Text          = "";
     m_newLpn = false;
 }
コード例 #2
0
ファイル: InventoryBLL.cs プロジェクト: shulemg/SPG
        private static void DeleteInventoryConsumption(Inventory productionRecord, Session inventorySession)
        {
            BomConsumption    consumption     = null;
            LocationInventory inventoryOnHand = null;

            using (XPCollection <BomConsumption> consumptions = productionRecord.InventoryConsumption)
            {
                for (int i = consumptions.Count - 1; i >= 0; i--)
                {
                    consumption     = consumptions[i];
                    inventoryOnHand = inventorySession.FindObject <LocationInventory>(new BinaryOperator(LocationInventory.Fields.LocationInventoryItem.ItemID.PropertyName, consumption.RawMatID.ItemID, BinaryOperatorType.Equal) & new BinaryOperator(LocationInventory.Fields.Location.Oid, UsersBLL.GetUsersLocalLocation(inventorySession, Properties.Settings.Default.UserName).Oid, BinaryOperatorType.Equal));
                    inventoryOnHand.QuantityOnHand += (float)(consumption.QuantityUsed + consumption.ScrapFactorUsed);
                    inventoryOnHand.Save();
                    consumption.Delete();
                }
            }
        }