Exemplo n.º 1
0
        public static Row Create(AllorsSession session, Table table)
        {
            var obj = session.Create <Row>();

            table.AddRow(obj);
            return(obj);
        }
Exemplo n.º 2
0
        public static Library Create(AllorsSession session, string name)
        {
            var lib = session.Create <Library>();

            lib.Name = name;
            return(lib);
        }
Exemplo n.º 3
0
 public void SetUp()
 {
     if (AllorsSession == null)
     {
         AllorsSession = AllorsConfiguration.CreateDisconnectedPopulation().CreateSession();
     }
 }
Exemplo n.º 4
0
        public Program Find(AllorsSession session, string programname)
        {
            AllorsExtent <Program> programs = this.Programs;

            programs.Filter.AddEquals(AllorsDomains.IseriesDomain.ProgramName.Role, programname);
            return(programs.First);
        }
Exemplo n.º 5
0
        public static Table Create(AllorsSession session, Library lib, string name)
        {
            var obj = session.Create<Table>();
            obj.Name = name;

            lib.AddTable(obj);
            return obj;
        }
Exemplo n.º 6
0
        public static DecimalCell Create(AllorsSession session, Row row, decimal value)
        {
            var obj = session.Create <DecimalCell>();

            obj.Value = value;

            row.AddCell(obj);
            return(obj);
        }
Exemplo n.º 7
0
        public static DateParameter Create(AllorsSession session, string name, DateTime value)
        {
            var param = session.Create <DateParameter>();

            param.Name  = name;
            param.Value = value;

            return(param);
        }
Exemplo n.º 8
0
        public static Program Create(AllorsSession session, string name, Library library)
        {
            var pgm = session.Create <Program>();

            pgm.Name = name;

            library.AddProgram(pgm);
            return(pgm);
        }
Exemplo n.º 9
0
        public static StringCell Create(AllorsSession session, Row row, string value)
        {
            var obj = session.Create <StringCell>();

            obj.Value = value;

            row.AddCell(obj);
            return(obj);
        }
Exemplo n.º 10
0
        public static IntParameter Create(AllorsSession session, string name, int value)
        {
            var param = session.Create <IntParameter>();

            param.Name  = name;
            param.Value = value;

            return(param);
        }
Exemplo n.º 11
0
        public static DateTimeCell Create(AllorsSession session, Row row, DateTime value)
        {
            var obj = session.Create <DateTimeCell>();

            obj.Value = value;

            row.AddCell(obj);
            return(obj);
        }
Exemplo n.º 12
0
        public static IntCell Create(AllorsSession session, Row row, int value)
        {
            var obj = session.Create <IntCell>();

            obj.Value = value;

            row.AddCell(obj);
            return(obj);
        }
Exemplo n.º 13
0
        public static StringParameter Create(AllorsSession session, string name, int length, string value)
        {
            var param = session.Create <StringParameter>();

            param.Length = length;
            param.Name   = name;
            param.Value  = value;

            return(param);
        }
Exemplo n.º 14
0
        public static Column Create(AllorsSession session, Table table, string name, Type dbType)
        {
            var obj = session.Create <Column>();

            obj.Name   = name;
            obj.DbType = dbType.ToString();

            table.AddColumn(obj);
            return(obj);
        }
Exemplo n.º 15
0
        public static DecimalParameter Create(AllorsSession session, string name, int precision, int scale, Decimal value)
        {
            var param = session.Create <DecimalParameter>();

            param.Name      = name;
            param.Precision = precision;
            param.Scale     = scale;
            param.Value     = value;

            return(param);
        }
Exemplo n.º 16
0
        public static Cell Create(AllorsSession session, Row row, Column col, object value)
        {
            switch (col.DbType)
            {
            case "System.String":
                return(StringCell.Create(session, row, (string)value));

            case "System.Integer":
            case "System.Int32":
                return(IntCell.Create(session, row, (int)value));

            case "System.Decimal":
                return(DecimalCell.Create(session, row, (decimal)value));

            case "System.DateTime":
                return(DateTimeCell.Create(session, row, (DateTime)value));

            default:
                throw new Exception("Type not supported exception");
            }
        }
Exemplo n.º 17
0
 public static IntParameter Instantiate(AllorsSession session, string id)
 {
     return((IntParameter)session.Instantiate(id));
 }
Exemplo n.º 18
0
 public static DecimalCell Instantiate(AllorsSession session, string id)
 {
     return((DecimalCell)session.Instantiate(id));
 }
Exemplo n.º 19
0
 public static IntCell Instantiate(AllorsSession session, string id)
 {
     return((IntCell)session.Instantiate(id));
 }
Exemplo n.º 20
0
 public void TearDown()
 {
     AllorsSession.Rollback();
     //AllorsSession.Dispose();
     AllorsSession = null;
 }
Exemplo n.º 21
0
 public static Row Instantiate(AllorsSession session, string id)
 {
     return((Row)session.Instantiate(id));
 }
Exemplo n.º 22
0
 public static DateTimeCell Instantiate(AllorsSession session, string id)
 {
     return((DateTimeCell)session.Instantiate(id));
 }
Exemplo n.º 23
0
 public static Column Instantiate(AllorsSession session, string id)
 {
     return((Column)session.Instantiate(id));
 }
Exemplo n.º 24
0
 public static Library Instantiate(AllorsSession session, string id)
 {
     return((Library)session.Instantiate(id));
 }
Exemplo n.º 25
0
 public static Program Instantiate(AllorsSession session, string id)
 {
     return((Program)session.Instantiate(id));
 }
Exemplo n.º 26
0
 public override System.String ToString()
 {
     return("Object[type=" + this.GetType().Name + ", id=" + AllorsId + "] " + AllorsSession.ToString());
 }
Exemplo n.º 27
0
 public static Table Instantiate(AllorsSession session, string id)
 {
     return((Table)session.Instantiate(id));
 }