Пример #1
0
 protected override void AssignFormControls()
 {
     Fac.Dto dto = base.FormDto.Dto as Fac.Dto;
     this.txtAddress.Text          = dto.Address;
     this.cboDistrict.SelectedItem = (this.FormDto as Fac.FormDto).DistrictList.FindLast((p) => { return(p.Id == dto.District.Id); });
     this.cboState.SelectedItem    = (this.FormDto as Fac.FormDto).StateList.FindLast((p) => { return(p.Id == dto.District.State.Id); });
     this.cboCountry.SelectedItem  = (this.FormDto as Fac.FormDto).CountryList.FindLast((p) => { return(p.Id == dto.District.State.Country.Id); });
     this.txtPin.Text      = Convert.ToString(dto.Pin);
     this.txtLandline.Text = Convert.ToString(dto.Landline);
 }
Пример #2
0
        public override void AssignData()
        {
            Dto dto = (base.FormDto as FormDto).Dto as Dto;

            Comp.Data data = base.ComponentData as Comp.Data;
            data.Id       = dto.Id;
            data.Address  = dto.Address;
            data.District = new District.Server(null).Convert(dto.District) as DistrictComp.Data;
            data.Pin      = dto.Pin;
            data.Landline = dto.Landline;
        }
Пример #3
0
 protected override void AssignDto()
 {
     Fac.Dto dto = base.FormDto.Dto as Fac.Dto;
     dto.Address  = this.txtAddress.Text.Trim();
     dto.District = this.cboDistrict.SelectedItem as Facade.District.Dto;
     dto.Pin      = Convert.ToInt32(this.txtPin.Text.Trim());
     if (!String.IsNullOrEmpty(this.txtLandline.Text.Trim()))
     {
         dto.Landline = Convert.ToInt32(this.txtLandline.Text.Trim());
     }
 }
Пример #4
0
        public override BinAff.Core.Data Convert(BinAff.Facade.Library.Dto dto)
        {
            Dto dt = dto as Dto;

            return(new Comp.Data
            {
                Id = dt.Id,
                Address = dt.Address,
                District = new District.Server(null).Convert(dt.District) as DistrictComp.Data,
                Pin = dt.Pin,
                Landline = dt.Landline,
            });
        }