Beispiel #1
0
        private void RegisterDocument()
        {
            using (CursorWait cw = CursorWait.CreateWaitCursor())
            {
                if (ObjectFactory.ActivityLine().Count > 0)
                {
                    if (!ClassFactory.DataBase.ActiveLineIsBinCodeEmpty())
                    {
                        if (ClassFactory.Logic.RegisterPlacement(false))
                        {
                            ClassFactory.Logic.DeleteActivityData();
                            ClassFactory.Logic.LoadDocPlacementDetails(ObjectFactory.PlacementActivityHeader().No);
                            InitEnterItem();
                        }
                    }
                    else
                    {
                        MyClass.ShowWarning("Регистрация невозможна. Укажите ячейки");
                    }
                }
                else
                {
                    ClassFactory.Logic.DeleteActivityData();
                    InitEnterItem();
                }

                CheckActiveTab();
            }
        }
        public void PrepareMessage()
        {
            FXmlMessage = new XmlMessageRegisterPlacement();
            if ((Boolean)FDictionary["Force"])
            {
                FXmlMessage.UserName     = ObjectFactory.Employee().UserBarCode;
                FXmlMessage.UserLocation = XmlOptions.Options.Location;
                FXmlMessage.Session      = Guid.Empty;
            }
            else
            {
                FXmlMessage.Session = ObjectFactory.Session().Session;
            }
            ObjectActivityLineList activityLine = ObjectFactory.ActivityLine();

            FXmlMessage.Document.No = ObjectFactory.PlacementActivityHeader().No;
            for (Int32 k = 0; k < activityLine.Count; k++)
            {
                if (activityLine.Item(k).BinCode != "")
                {
                    XmlMessageRegisterPlacementDocumentLine xmlLine = FXmlMessage.Document.AddLineInDocument();
                    ObjectPlacementActivityLine             pal     = ObjectFactory.PlacementActivityLine().ItemFromId(activityLine.Item(k).Id_PlacementActivityLine);
                    xmlLine.No        = 0;
                    xmlLine.LineNo    = pal.LineNo;
                    xmlLine.ItemNo    = pal.ItemNo;
                    xmlLine.PlacedQty = activityLine.Item(k).ProcessedQty;
                    xmlLine.BinCode   = activityLine.Item(k).BinCode;
                }
            }
        }
Beispiel #3
0
 private void FormDetail_Closing(object sender, CancelEventArgs e)
 {
     e.Cancel = false;
     using (CursorWait cw = CursorWait.CreateWaitCursor())
     {
         if (ObjectFactory.ActivityLine().Count != 0)
         {
             e.Cancel = true;
             MyClass.ShowWarning("Остались незарегистрированные строки!");
         }
     }
 }