protected override void AssignFormControls() { Fac.Dto dto = base.FormDto.Dto as Fac.Dto; this.dtpDateOfBirth.Value = dto.DateOfBirth; this.txtPlaceOfBirth.Text = dto.BirthPlace; this.cboGender.SelectedItem = (this.FormDto as Fac.FormDto).GenderList.FindLast((p) => { return(p.Id == dto.Gender.Id); }); this.cboMotherTongue.SelectedItem = (this.FormDto as Fac.FormDto).MotherTongueList.FindLast((p) => { return(p.Id == dto.MotherTongue.Id); }); this.cboReligion.SelectedItem = (this.FormDto as Fac.FormDto).ReligionList.FindLast((p) => { return(p.Id == dto.Religion.Id); }); this.cboCaste.SelectedItem = (this.FormDto as Fac.FormDto).CasteList.FindLast((p) => { return(p.Id == dto.Caste.Id); }); this.cboSubCaste.SelectedItem = (this.FormDto as Fac.FormDto).SubCasteList.FindLast((p) => { return(p.Id == dto.SubCaste.Id); }); }
protected override void AssignDto() { Fac.Dto dto = base.FormDto.Dto as Fac.Dto; dto.DateOfBirth = this.dtpDateOfBirth.Value; dto.BirthPlace = this.txtPlaceOfBirth.Text.Trim(); dto.Gender = this.cboGender.SelectedItem as Conf.Gender.Dto; dto.MotherTongue = this.cboMotherTongue.SelectedItem as Conf.MotherTongue.Dto; dto.Religion = this.cboReligion.SelectedItem as Conf.Religion.Dto; dto.Caste = this.cboCaste.SelectedItem as Conf.Caste.Dto; dto.SubCaste = this.cboSubCaste.SelectedItem as Conf.SubCaste.Dto; }
public override void AssignData() { Dto dto = (base.FormDto as FormDto).Dto as Dto; if (dto == null) { return; } Comp.Data data = base.ComponentData as Comp.Data; data.Id = dto.Id; data.DateOfBirth = dto.DateOfBirth; data.BirthPlace = dto.BirthPlace; data.MotherTongue = new ConfFac.MotherTongue.Server(null).Convert(dto.MotherTongue) as Conf.MotherTongue.Data; data.Religion = new ConfFac.Religion.Server(null).Convert(dto.Religion) as Conf.Religion.Data; data.Caste = new ConfFac.Caste.Server(null).Convert(dto.Caste) as Conf.Caste.Data; data.SubCaste = new ConfFac.SubCaste.Server(null).Convert(dto.SubCaste) as Conf.SubCaste.Data; data.Gender = new ConfFac.Gender.Server(null).Convert(dto.Gender) as Conf.Gender.Data; data.PresentAddress = new ConfFac.ContactInformation.Server(null).Convert(dto.CurrentAddress) as Conf.ContactInformation.Data; data.PermanentAddress = new ConfFac.ContactInformation.Server(null).Convert(dto.PermanentAddress) as Conf.ContactInformation.Data; }
public override BinAff.Core.Data Convert(BinAff.Facade.Library.Dto dto) { if (dto == null) { return(null); } Dto dt = dto as Dto; return(new Comp.Data { Id = dt.Id, DateOfBirth = dt.DateOfBirth, BirthPlace = dt.BirthPlace, MotherTongue = new ConfFac.MotherTongue.Server(null).Convert(dt.MotherTongue) as Conf.MotherTongue.Data, Religion = new ConfFac.Religion.Server(null).Convert(dt.Religion) as Conf.Religion.Data, Caste = new ConfFac.Caste.Server(null).Convert(dt.Caste) as Conf.Caste.Data, SubCaste = new ConfFac.SubCaste.Server(null).Convert(dt.SubCaste) as Conf.SubCaste.Data, Gender = new ConfFac.Gender.Server(null).Convert(dt.Gender) as Conf.Gender.Data, PresentAddress = new ConfFac.ContactInformation.Server(null).Convert(dt.CurrentAddress) as Conf.ContactInformation.Data, PermanentAddress = new ConfFac.ContactInformation.Server(null).Convert(dt.PermanentAddress) as Conf.ContactInformation.Data, }); }