Ejemplo n.º 1
0
        public InventoryTransactionsLog GetByLine(int lineId)
        {
            var transLog   = new InventoryTransactionsLog(_companyDb);
            var tableQuery = new TableQuery(transLog);

            tableQuery.Where.Add(
                new QueryParam(
                    transLog.Collumns[InventoryTransactionsLog.FieldsName.ApplyEntry], _docEntry));

            tableQuery.Where.Add(
                new QueryParam(
                    transLog.Collumns[InventoryTransactionsLog.FieldsName.ApplyType], _docType));

            tableQuery.Where.Add(
                new QueryParam(
                    transLog.Collumns[InventoryTransactionsLog.FieldsName.ApplyLine], lineId));

            var transType     = DocumentObjectType.GetDocTransactionType((eDocumentObjectType)_docType);
            var accumOnHand   = 1;
            var accumCommited = 2;
            var stockEff      = transType == eTransactionType.oIn ? accumCommited : accumOnHand;

            tableQuery.Where.Add(
                new QueryParam(
                    transLog.Collumns[InventoryTransactionsLog.FieldsName.StockEff], eCondition.ecEqual, stockEff));

            var transLogs = transLog
                            .FillCollection <InventoryTransactionsLog>(tableQuery)
                            .FirstOrDefault() ?? new InventoryTransactionsLog(_companyDb);

            transLogs.Details = GetDetails(transLogs.LogEntry);

            return(transLogs);
        }
 internal DocumentSubsetCollection(DocumentObjectCollection A_0, DocumentObjectType A_1)
 {
     this.documentObjectCollection_0 = A_0;
     this.documentObjectType_0       = A_1;
     this.method_9();
     A_0.class54_0.method_0(new DocumentObjectCollection.ChangeItems(this.method_11));
 }
Ejemplo n.º 3
0
    protected void method_7(IBody A_0)
    {
        int        num    = A_0.ChildObjects.Count - 1;
        BodyRegion region = null;

        for (int i = 0; i <= num; i++)
        {
            region = A_0.ChildObjects[i] as BodyRegion;
            DocumentObjectType documentObjectType = region.DocumentObjectType;
            switch (documentObjectType)
            {
            case DocumentObjectType.Paragraph:
            {
                bool flag = (region as Paragraph) == this.paragraph_0;
                this.method_8(region as IParagraph, flag);
                break;
            }

            case DocumentObjectType.StructureDocumentTag:
                this.method_7((region as StructureDocumentTag).SDTContent);
                break;

            default:
                if (documentObjectType == DocumentObjectType.Table)
                {
                    this.method_11(region as ITable);
                }
                break;
            }
        }
    }
Ejemplo n.º 4
0
 internal static bool smethod_13(DocumentObjectType A_0)
 {
     if ((A_0 != DocumentObjectType.StructureDocumentTag) && (A_0 != DocumentObjectType.CustomXml))
     {
         return(A_0 == DocumentObjectType.SmartTag);
     }
     return(true);
 }
Ejemplo n.º 5
0
    internal static DocumentObject smethod_2(DocumentObject A_0, DocumentObjectType A_1)
    {
        DocumentObject obj2 = A_0.method_6(A_1);

        if (obj2 == null)
        {
            return(A_0);
        }
        return(obj2);
    }
 internal DocumentObject method_21(DocumentObjectType A_0)
 {
     for (int i = base.Count - 1; i >= 0; i--)
     {
         DocumentObject obj2 = this[i];
         if (obj2.DocumentObjectType == A_0)
         {
             return(obj2);
         }
     }
     return(null);
 }
 internal void method_11(DocumentObjectType A_0)
 {
     for (int i = 0; i < base.Count; i++)
     {
         DocumentObject obj2 = this[i];
         if (obj2.DocumentObjectType == A_0)
         {
             obj2.method_0(null);
             base.InnerList.RemoveAt(i);
             i--;
         }
     }
 }
Ejemplo n.º 8
0
        public DocumentObject GetAncestor(DocumentObjectType objectType)
        {
            DocumentObject owner = base.Owner;

            while (owner.DocumentObjectType != objectType)
            {
                if (owner.Owner == null)
                {
                    return(null);
                }
                owner = owner.Owner;
            }
            return(owner);
        }
Ejemplo n.º 9
0
    internal void method_5(DocumentObjectType A_0)
    {
        int num = 0x10;

        if (this.documentObject_0.DocumentObjectType != A_0)
        {
            throw new InvalidOperationException(string.Format(BookmarkStart.b("愵儷䤹夻ḽ㬿牁㥃晅⩇㽉㡋湍⭏捑⥓硕", num), A_0, this.documentObject_0.DocumentObjectType));
        }
        if (this.documentObject_0.DocumentObjectType == DocumentObjectType.Body)
        {
            this.method_8(((Body)this.documentObject_0).method_44());
        }
        this.documentObject_0 = this.documentObject_0.ParentObject;
    }
        internal DocumentObject method_20(DocumentObjectType A_0)
        {
            int num   = 0;
            int count = base.Count;

            while (num < count)
            {
                DocumentObject obj2 = this[num];
                if (obj2.DocumentObjectType == A_0)
                {
                    return(obj2);
                }
                num++;
            }
            return(null);
        }
Ejemplo n.º 11
0
    internal static bool smethod_9(DocumentObject A_0)
    {
        DocumentObjectType documentObjectType = A_0.DocumentObjectType;

        switch (documentObjectType)
        {
        case DocumentObjectType.StructureDocumentTag:
            return(false);

        case DocumentObjectType.TableCell:
            return(true);
        }
        if (documentObjectType != DocumentObjectType.CustomXml)
        {
            return(false);
        }
        return(((Class9)A_0).method_29() == MarkupLevel.Cell);
    }
        internal int method_10(int A_0, DocumentObjectType A_1, bool A_2)
        {
            // This item is obfuscated and can not be translated.
            DocumentObject obj2;

            do
            {
                if (A_2)
                {
                }
                A_0++;
                if ((A_0 > (base.InnerList.Count - 1)) || (A_0 < 0))
                {
                    return(-1);
                }
                obj2 = base.InnerList[A_0] as DocumentObject;
            }while (obj2.DocumentObjectType != A_1);
            return(A_0);
        }
Ejemplo n.º 13
0
    private void method_0(DocumentObjectType A_0)
    {
        int num = 0x13;

        if ((this.documentObject_0.DocumentObjectType != A_0) && !(this.documentObject_0.Owner is TextBox))
        {
            if (this.documentObject_0.DocumentObjectType == DocumentObjectType.TableCell)
            {
                this.method_13();
                TableRow row2 = (TableRow)this.documentObject_0;
                this.method_13();
                row2.method_19();
                Table table = (Table)this.documentObject_0;
                smethod_5(table);
                this.method_13();
            }
            else if (this.documentObject_0.DocumentObjectType == DocumentObjectType.TableRow)
            {
                TableRow row = (TableRow)this.documentObject_0;
                this.method_13();
                row.method_19();
                this.method_13();
            }
            else
            {
                if (this.documentObject_0.DocumentObjectType != DocumentObjectType.Table)
                {
                    throw new InvalidOperationException(BookmarkStart.b("嘸为䤼Ἶ⹀╂敄㑆え╊⹌慎", num));
                }
                this.method_13();
            }
        }
        else
        {
            switch (A_0)
            {
            case DocumentObjectType.HeaderFooter:
            case DocumentObjectType.Shape:
                smethod_0(this.documentObject_0);
                break;
            }
        }
    }
Ejemplo n.º 14
0
    internal static bool smethod_10(DocumentObject A_0)
    {
        DocumentObjectType documentObjectType = A_0.DocumentObjectType;

        if (documentObjectType <= DocumentObjectType.TextRange)
        {
            if (documentObjectType == DocumentObjectType.StructureDocumentTag)
            {
                return(false);
            }
            if (documentObjectType != DocumentObjectType.TextRange)
            {
                goto Label_008D;
            }
            goto Label_008F;
        }
        switch (documentObjectType)
        {
        case DocumentObjectType.TextFormField:
        case DocumentObjectType.DropDownFormField:
        case DocumentObjectType.BookmarkStart:
        case DocumentObjectType.BookmarkEnd:
        case DocumentObjectType.Shape:
        case DocumentObjectType.ShapeGroup:
        case DocumentObjectType.Comment:
        case DocumentObjectType.Footnote:
        case DocumentObjectType.FieldMark:
        case DocumentObjectType.CommentMark:
        case DocumentObjectType.CommentEnd:
        case DocumentObjectType.SmartTag:
            goto Label_008F;

        case DocumentObjectType.CustomXml:
            return(((Class9)A_0).method_29() == MarkupLevel.Inline);
        }
Label_008D:
        return(false);

Label_008F:
        return(true);
    }
Ejemplo n.º 15
0
 internal static bool smethod_12(DocumentObjectType A_0)
 {
     return((A_0 != DocumentObjectType.Any) && !smethod_13(A_0));
 }
Ejemplo n.º 16
0
    private void method_10(IParagraphBase A_0)
    {
        IParagraphBase     base2 = A_0;
        DocumentObjectType documentObjectType = base2.DocumentObjectType;

        if (documentObjectType <= DocumentObjectType.TextRange)
        {
            switch (documentObjectType)
            {
            case DocumentObjectType.StructureDocumentTagInline:
                this.method_9((base2 as StructureDocumentTagInline).SDTContent.Items);
                break;

            case DocumentObjectType.TextRange:
                this.method_13(base2 as ITextRange);
                break;
            }
        }
        else
        {
            switch (documentObjectType)
            {
            case DocumentObjectType.Shape:
            {
                ShapeObject obj4 = base2 as ShapeObject;
                if (!obj4.HasInternalTextbox)
                {
                    if (obj4.IsGroup)
                    {
                        foreach (DocumentObject obj2 in obj4.ChildObjects)
                        {
                            if (obj2 is ParagraphBase)
                            {
                                this.method_10(obj2 as ParagraphBase);
                            }
                        }
                    }
                    break;
                }
                this.method_7(obj4.InternerTextbox.Body);
                return;
            }

            case DocumentObjectType.ShapeGroup:
            {
                ShapeGroup group = base2 as ShapeGroup;
                foreach (DocumentObject obj3 in group.ChildObjects)
                {
                    if (obj3 is ParagraphBase)
                    {
                        this.method_10(obj3 as ParagraphBase);
                    }
                }
                break;
            }

            case DocumentObjectType.TextBox:
                this.method_7((base2 as TextBox).Body);
                return;

            case DocumentObjectType.Break:
                if ((base2 as Break).BreakType != BreakType.LineBreak)
                {
                    break;
                }
                this.method_16();
                return;

            case DocumentObjectType.Symbol:
                this.method_14(base2 as Symbol);
                return;

            default:
                return;
            }
        }
    }