public UjfHouseApartmentDetailAddChangeForm(UjfHouseApartmentDetail had)
 {
     this.houseApartmentDetail = new UjfHouseApartmentDetail();
     this.InitializeComponent();
     if (!Manager.DesignMode)
     {
         this.set_Font(Manager.WindowFont);
         this.houseApartmentDetail = had;
         this.sfdApartmentSystemType.Faset = FasetsEnum.ApartmentSystemTypes;
         this.sfdApartmentSystemType.RefreshValuesWithNull();
         this.sfdApartmentSystemType.set_SelectedIndex(0);
         this.sfdBuildingComponentType.Faset = FasetsEnum.BuildingComponentType;
         this.sfdBuildingComponentType.RefreshValuesWithNull();
         this.sfdBuildingComponentType.set_SelectedIndex(0);
         if (!had.IsNew)
         {
             this.houseApartmentDetail = had;
             this.set_Text("Изменить жилое помещение");
             this.sfdBuildingComponentType.SelectedFasetItem = FasetItem.FindById(this.houseApartmentDetail.BuildingComponentTypeId);
             this.sfdApartmentSystemType.SelectedFasetItem = FasetItem.FindById(this.houseApartmentDetail.ApartmentSystemTypeId);
             this.cbIsCommunal.set_Checked(this.houseApartmentDetail.IsCommunal);
             this.cbIsRoom.set_Checked(this.houseApartmentDetail.IsRoom);
             this.nudApartmentCount.set_Value((decimal) this.houseApartmentDetail.ApartmentCount);
             this.nudRoomCount.set_Value((decimal) this.houseApartmentDetail.RoomCount);
             this.tbBlockTotalArea.set_Text(this.houseApartmentDetail.BlockTotalArea.ToString());
             this.tbTotalArea.set_Text(this.houseApartmentDetail.TotalArea.ToString());
             this.tbLivingArea.set_Text(this.houseApartmentDetail.LivingArea.ToString());
             this.tbLoggiaArea.set_Text(this.houseApartmentDetail.LoggiaArea.ToString());
             this.tbBalconyArea.set_Text(this.houseApartmentDetail.BalconyArea.ToString());
             this.tbVerandaArea.set_Text(this.houseApartmentDetail.VerandaArea.ToString());
         }
     }
 }
 public UjfHouseApartmentDetailAddChangeForm()
 {
     this.houseApartmentDetail = new UjfHouseApartmentDetail();
     this.InitializeComponent();
     if (!Manager.DesignMode)
     {
         this.set_Font(Manager.WindowFont);
         this.sfdApartmentSystemType.Faset = FasetsEnum.ApartmentSystemTypes;
         this.sfdApartmentSystemType.RefreshValuesWithNull();
         this.sfdBuildingComponentType.Faset = FasetsEnum.BuildingComponentType;
         this.sfdBuildingComponentType.RefreshValuesWithNull();
         this.houseApartmentDetail = new UjfHouseApartmentDetail();
     }
 }
Exemple #3
0
 private void tsbAddApartmentDetail_Click(object sender, System.EventArgs e)
 {
     UjfHouseApartmentDetail had = new UjfHouseApartmentDetail {
         HouseId = this.house.Id
     };
     new UjfHouseApartmentDetailAddChangeForm(had).ShowDialog();
     this.UpdateHouseApartmentDetail(this.house.Id);
 }