Ejemplo n.º 1
0
        public int SaveEntityData(SomethingShared.Entity00 someEntity)
        {
            if (!someEntity.MyValidationMethod())
            {
                someEntity.Id = (int) SomethingShared.Globals.AnotherGlobal;
            }

            return ActualSave(someEntity);
        }
Ejemplo n.º 2
0
        public string GetEntityData(SomethingShared.ArgsObject args)
        {
            if (args.Property03)
            {
                return SomethingShared.Globals.SomeGlobal;
            }

            return string.Format("{0} {1} {2:0000}", args.Property00, args.Property01, args.Property04);
        }
Ejemplo n.º 3
0
        public SomethingShared.Entity00 GetEntityByArgs(SomethingShared.ArgsObject args)
        {
            if (args.Property03)
            {
                return new Entity00() {FirstName = string.Empty, LastName = string.Empty, Id = -1};
            }
            if (args.Property02 > 0)
            {
                return new Entity00() {FirstName = "Booty", LastName = "GotSmack", Id = 99};
            }

            switch (args.Property01)
            {
                case "":
                    return new Entity00() {FirstName = "More", LastName = "Info"};
                case SomethingShared.Globals.SomeGlobal:
                    return new Entity00() {FirstName = "AGlobal", LastName = "Reference", Id = args.Property04};
                default:
                    return new Entity00() {FirstName = "Sepee", LastName = "sflkjfd"};
            }
        }
Ejemplo n.º 4
0
        public string YouGottaGetWidIt(SomethingShared.ArgsObject someArgs)
        {
            DisplayRogerDetails("dodo");
            var uNotCookin = someArgs.Property02.ToString("X4");
            if (someArgs.Property03)
            {
                someArgs.Property01 = string.Format("({0})", uNotCookin);
            }

            var mySecondSomething = new SomeSecondDll.SecondMiddleClass();
            var gotThisFromSecondSomething = mySecondSomething.GetEntityData(someArgs);
            if (someArgs.Property04 > 5)
                gotThisFromSecondSomething = string.Format("({0})", gotThisFromSecondSomething);

            someArgs.Property01 = gotThisFromSecondSomething;

            var myThirdThing = new ThirdDll.DbLike();
            var fromThirdThing = myThirdThing.GetEntityByArgs(someArgs);
            fromThirdThing.FirstName = "Masta Wanka";
            return string.Format("{0} {1} {2}", fromThirdThing.FirstName, fromThirdThing.LastName,
                gotThisFromSecondSomething);
        }
Ejemplo n.º 5
0
 internal int ActualSave(SomethingShared.Entity00 a)
 {
     return SomethingShared.Globals.SomeStaticMethod(a);
 }
Ejemplo n.º 6
0
 public SomethingShared.Entity00 GetMyEntity(SomethingShared.ArgsObject args)
 {
     return _myDbLikeThing.GetEntityByArgs(args);
 }
Ejemplo n.º 7
0
 public int SaveSomething(SomethingShared.Entity00 entity00)
 {
     return _myDbLikeThing.SaveEntityData(entity00);
 }
Ejemplo n.º 8
0
 public string GetEntityData(SomethingShared.ArgsObject args)
 {
     return _myDbLikeThing.GetEntityData(args);
 }