Ejemplo n.º 1
0
        public static MiMFa_Table AddInTable(MiMFa_Table mainDT, object str, string colName, MiMFa_TableValuePositionType put)
        {
            switch (put)
            {
            case MiMFa_TableValuePositionType.NextRowCell:
                mainDT.AddRowSafe();
                if (string.IsNullOrWhiteSpace(colName))
                {
                    mainDT.AddInLastRowCellSafe(str);
                }
                else
                {
                    mainDT.AddInLastRowCellSafe(str, colName);
                }
                break;

            case MiMFa_TableValuePositionType.Null:
            case MiMFa_TableValuePositionType.NextColumnCell:
                if (string.IsNullOrWhiteSpace(colName))
                {
                    mainDT.AddInLastRowCellSafe(str);
                }
                else
                {
                    mainDT.AddInLastRowCellSafe(str, colName);
                }
                break;

            case MiMFa_TableValuePositionType.NextSubCell:
                if (string.IsNullOrWhiteSpace(colName))
                {
                    mainDT.AppendInLastRowCellSafe(str);
                }
                else
                {
                    mainDT.AppendInLastRowCellSafe(str, colName);
                }
                break;
            }
            return(mainDT);
        }