Exemple #1
0
        public override void AssignData()
        {
            Dto dto = (this.FormDto as FormDto).Dto as Dto;

            Comp.Data data = base.ComponentData as Comp.Data;
            data.Id                  = dto.Id;
            data.FirstName           = dto.FirstName;
            data.MiddleName          = dto.MiddleName;
            data.LastName            = dto.LastName;
            data.RollNumber          = dto.RollNumber;
            data.Standard            = new SchlFac.Standard.Server(null).Convert(dto.Standard) as Schl.Standard.Data;
            data.Section             = new SchlFac.Section.Server(null).Convert(dto.Section) as Schl.Section.Data;
            data.PersonalInformation = new PersonalInformation.Server(null).Convert(dto.PersonalInformation) as Comp.PersonalInformation.Data;
            data.Category            = new Category.Server(null).Convert(dto.Category) as Comp.Category.Data;
            data.GuardianList        = new Guardian.Server(null).ConvertAll <BinAff.Core.Data, BinAff.Facade.Library.Dto>(dto.GuardianList);
        }
Exemple #2
0
 public override BinAff.Facade.Library.Dto Convert(BinAff.Core.Data data)
 {
     Comp.Data dt = data as Comp.Data;
     return(new Dto
     {
         Id = dt.Id,
         StudentId = dt.StudentId,
         FirstName = dt.FirstName,
         MiddleName = dt.MiddleName,
         LastName = dt.LastName,
         RollNumber = dt.RollNumber,
         Standard = new SchlFac.Standard.Server(null).Convert(dt.Standard) as SchlFac.Standard.Dto,
         Section = new SchlFac.Section.Server(null).Convert(dt.Section) as SchlFac.Section.Dto,
         PersonalInformation = new PersonalInformation.Server(null).Convert(dt.PersonalInformation) as PersonalInformation.Dto,
         GuardianList = new Guardian.Server(null).ConvertAll <BinAff.Core.Data, BinAff.Facade.Library.Dto>(dt.GuardianList),
         Category = new Category.Server(null).Convert(dt.Category) as Category.Dto,
     });
 }
Exemple #3
0
 public Server(Data data)
     : base(data)
 {
 }
Exemple #4
0
 public Validator(Data data)
     : base(data)
 {
 }
Exemple #5
0
 public void Save()
 {
     Data data = new Data
     {
         FirstName = "Arighna",
         MiddleName = "",
         LastName = "Kar",
         Standard = new Schl.Standard.Data { Id = 1 },
         Section = new Schl.Section.Data { Id = 1 },
         RollNumber = 1,
         Category = new Category.Data { Id = 1 },
         PersonalInformation = new PersonalInformation.Data
         {
             DateOfBirth = DateTime.Today.Subtract(new TimeSpan(7300, 0, 0, 0)),
             BirthPlace = "Bagnan",
             Caste = new Conf.Caste.Data { Id = 1 },
             SubCaste = new Conf.SubCaste.Data { Id = 1 },
             MotherTongue = new Conf.MotherTongue.Data { Id = 1 },
             Religion = new Conf.Religion.Data { Id = 1 },
             Gender = new Conf.Gender.Data { Id = 1 },
             PresentAddress = new Conf.ContactInformation.Data
             {
                 Address = "Kodichikkanhalli",
                 District = new Conf.District.Data
                 {
                     Id = 1,
                 },
                 Pin = 560076,
             },
             PermanentAddress = new Conf.ContactInformation.Data
             {
                 Address = "Boalia",
                 District = new Conf.District.Data { Id = 2 },
                 Pin = 700084,
             },
         },
         GuardianList = new System.Collections.Generic.List<BinAff.Core.Data>
         {
             new Stud.Guardian.Data
             {
                 Profile = new Conf.Profile.Data
                 {
                     FirstName = "Ajoy",
                     LastName = "Kar",
                     Mobile = new Conf.Mobile.Data
                     {
                         Number = 9875403258,
                         Country = new Conf.Country.Data { Id = 2},
                     },
                     Occupation = new Conf.Occupation.Data { Id = 1},
                     ContactInformation = new Conf.ContactInformation.Data
                     {
                         Address = "Garia",
                         District = new Conf.District.Data { Id = 1 },
                         Pin = 700084
                     },
                 },
                 Relationship = new Conf.Relationship.Data { Id = 1},
             }
         },
     };
     BinAff.Core.Crud server = new Server(data);
     server.DataAccess.ConnectionString = @"Data Source=.\BinAff;Initial Catalog=Sparkle;Integrated Security=True;";
     BinAff.Core.ReturnObject<Boolean> ret = (server as BinAff.Core.ICrud).Save();
     Assert.AreEqual(ret.Value, true);
 }
Exemple #6
0
 public Dao(Data data)
     : base(data)
 {
 }