public PersonBenefitOutAddChangeForm(PersonBenefitOut pbo)
 {
     this.InitializeComponent();
     this.bOk.set_Text("Изменить");
     this.set_Text("Редактирование");
     this.m_PersonBenefitOut = pbo;
     this.cbIsDelete.set_Checked(this.m_PersonBenefitOut.IsDelete);
     this.dbPeriod.Value = this.m_PersonBenefitOut.Period;
     this.dbByPeriod.Value = this.m_PersonBenefitOut.ByPeriod;
     this.tbBenefitCode.set_Text(this.m_PersonBenefitOut.BenefitCode);
     this.tbBenefitName.set_Text(this.m_PersonBenefitOut.BenefitName);
     this.tbAccountNumber.set_Text(this.m_PersonBenefitOut.AccountNumber);
     this.nudSumm.set_Value(this.m_PersonBenefitOut.Summ);
     this.dbCreated.Value = this.m_PersonBenefitOut.Created;
     this.tbComment.set_Text(this.m_PersonBenefitOut.Comment);
 }
 public PersonBenefitOutAddChangeForm(ApartmentResident ar)
 {
     this.InitializeComponent();
     this.bOk.set_Text("Добавить");
     this.set_Text("Добавление");
     this.m_PersonBenefitOut = new PersonBenefitOut();
     this.m_PersonBenefitOut.PersonId = ar.PersonId;
     this.m_PersonBenefitOut.PersonName = ar.PersonName;
     this.cbIsDelete.set_Enabled(false);
     this.dbCreated.Value = System.DateTime.Today;
     this.dbCreated.set_Enabled(false);
     this.bsBenefits.set_DataSource(Benefit.FindBy(ar.PersonId));
     this.tbBenefitName.set_Text(((Benefit) this.bsBenefits.get_Current()).ShortName);
     this.tbBenefitName.set_Enabled(false);
     this.cbBenefitCode.set_Visible(true);
     this.dbPeriod.set_Enabled(true);
     this.dbByPeriod.set_Enabled(true);
     this.bsAccounts.set_DataSource(Account.FindActiveByApartmentId(ar.ApartmentId));
     this.cbAccount.set_Visible(true);
 }