Exemplo n.º 1
0
        private uint SetStyleForHeaderCell(string modelName, string fieldName)
        {
            uint styleInd = OpenXmlSpreadsheetUtilities.DEFAULT_CELL;

            if (modelName.Equals("ItemUsageReportItemModel"))
            {
                styleInd = ItemUsageReportItemModel.SetStyleForHeader(fieldName, styleInd);
            }
            else if (modelName.Equals("ListItemModel"))
            {
                styleInd = ListItemModel.SetStyleForHeader(fieldName, styleInd);
            }
            else if (modelName.Equals("InvoiceItemModel"))
            {
                styleInd = InvoiceItemModel.SetStyleForHeader(fieldName, styleInd);
            }
            else if (modelName.Equals("Product"))
            {
                styleInd = Product.SetStyleForHeader(fieldName, styleInd);
            }
            else if (modelName.Equals("OrderLine"))
            {
                styleInd = OrderLine.SetStyleForHeader(fieldName, styleInd);
            }
            else if (modelName.Equals("ShoppingCartItem"))
            {
                styleInd = ShoppingCartItem.SetStyleForHeader(fieldName, styleInd);
            }
            else if (modelName.Equals("Order"))
            {
                styleInd = Order.SetStyleForHeader(fieldName, styleInd);
            }
            else if (modelName.Equals("InvoiceModel"))
            {
                styleInd = InvoiceModel.SetStyleForHeader(fieldName, styleInd);
            }
            return(styleInd);
        }