Пример #1
0
 public void Fill(Person person)
 {
     this.m_Person = person;
     if (this.m_Person == Person.Null)
     {
         this.bsPersonProperties.Clear();
     }
     else
     {
         this.bsPersonProperties.set_DataSource(PersonProperty.FindByPersonId(this.m_Person.Id));
     }
 }
Пример #2
0
 public void Refresh(Person person)
 {
     person.FName = this.tbFName.get_Text().Trim();
     person.LName = this.tbLName.get_Text().Trim();
     person.MName = this.tbMName.get_Text().Trim();
     person.TypeDoc = this.selectTypeDoc.SelectedFasetItem.Id;
     if (!this.dbxBirthDay.IsNull)
     {
         person.BirthDate = this.dbxBirthDay.Value;
     }
     if (!this.dbxDoc.IsNull)
     {
         person.DateDoc = this.dbxDoc.Value;
     }
     person.SerDoc = this.tbxSer.get_Text().Trim();
     person.NumDoc = this.tbxNum.get_Text().Trim();
     person.OrgDoc = this.tbxOrg.get_Text().Trim();
     person.InsuranceCertificate = this.mtbInsuranceCertificate.get_Text();
 }
Пример #3
0
 public void Fill(Person person)
 {
     this.tbFName.set_Text(person.FName);
     this.tbLName.set_Text(person.LName);
     this.tbMName.set_Text(person.MName);
     this.selectTypeDoc.SelectedFasetItem = person.GetTypeDoc();
     if (person.BirthDate != System.DateTime.MinValue)
     {
         this.dbxBirthDay.Value = person.BirthDate;
     }
     if (person.DateDoc != System.DateTime.MinValue)
     {
         this.dbxDoc.Value = person.DateDoc;
     }
     this.tbxSer.set_Text(person.SerDoc);
     this.tbxNum.set_Text(person.NumDoc);
     this.tbxOrg.set_Text(person.OrgDoc);
     this.mtbInsuranceCertificate.set_Text(person.InsuranceCertificate);
 }
 private void selectPersonBenefitOwner_OnPersonSelected(Person person)
 {
     this.bsBenefits.set_DataSource(Benefit.GetBenefitsByPersonId(this.selectPersonBenefitOwner.SelectedPerson.Id));
     this.bsBenefits.Add(Benefit.Null);
     this.bsBenefits.set_Position(this.bsBenefits.IndexOf(Benefit.Null));
 }
Пример #5
0
 private void selectPerson_OnPersonSelected(Person person)
 {
     if (this.selectPerson.SelectedPerson != null)
     {
         this.btnSave.set_Enabled(true);
     }
     else
     {
         this.btnSave.set_Enabled(false);
     }
 }
Пример #6
0
 private bool ValidateFindParametrs(Person person)
 {
     if ((((person.FName == "") && (person.LName == "")) && ((person.MName == "") && (person.SerDoc == ""))) && ((person.NumDoc == "") && (person.BirthDate == System.DateTime.MinValue)))
     {
         return false;
     }
     return true;
 }
 public AccountGrozniy_WithoutDolgReportForm()
 {
     this.m_Person = Person.Null;
     this.InitializeComponent();
 }
Пример #8
0
 private void UpdatePerson(Person pr)
 {
     pr.LName = this.tbxLName.get_Text();
     pr.FName = this.tbxFName.get_Text();
     pr.MName = this.tbxMName.get_Text();
     pr.BirthDate = this.dbxBirthDay.Value;
     pr.SerDoc = this.tbxSerDoc.get_Text();
     pr.NumDoc = this.tbxNumDoc.get_Text();
     pr.OrgDoc = this.tbxOrg.get_Text();
     pr.DateDoc = this.dbxDoc.Value;
     pr.TypeDoc = 0x18;
 }
Пример #9
0
 private Person FillngPerson(int tipe)
 {
     if ((((this.tbxLName.get_Text() == "") || (this.tbxFName.get_Text() == "")) || ((this.tbxMName.get_Text() == "") || (this.dbxBirthDay.Value == System.DateTime.MinValue))) || (((this.tbxSerDoc.get_Text() == "") || (this.tbxNumDoc.get_Text() == "")) || ((this.tbxOrg.get_Text() == "") || (this.dbxDoc.Value == System.DateTime.MinValue))))
     {
         System.Windows.Forms.MessageBox.Show("Заполните все поля", "Предупреждение", System.Windows.Forms.MessageBoxButtons.OK);
         return null;
     }
     if (this.tbxSerDoc.get_Text().get_Length() != 4)
     {
         System.Windows.Forms.MessageBox.Show("Серия паспорта заполена не верно", "Предупреждение", System.Windows.Forms.MessageBoxButtons.OK);
         return null;
     }
     if (this.tbxNumDoc.get_Text().get_Length() != 6)
     {
         System.Windows.Forms.MessageBox.Show("Номер паспорта заполнен не верно", "Предупреждение", System.Windows.Forms.MessageBoxButtons.OK);
         return null;
     }
     if (this.dbxBirthDay.Value < Constants.MinDate)
     {
         System.Windows.Forms.MessageBox.Show("Поле дата рождения заполенно не верно", "Предупреждение", System.Windows.Forms.MessageBoxButtons.OK);
         return null;
     }
     if (this.dbxDoc.Value < Constants.MinDate)
     {
         System.Windows.Forms.MessageBox.Show("Поле дата выдачи документа заполенно не верно", "Предупреждение", System.Windows.Forms.MessageBoxButtons.OK);
         return null;
     }
     if (tipe == 1)
     {
         Person pr = new Person();
         this.UpdatePerson(pr);
         pr.SaveChanges();
         return pr;
     }
     if (this.ChangePerson.get_Text() != "Подтвердить плательщика")
     {
         this.UpdatePerson(this.m_PersonPayer);
     }
     return this.m_PersonPayer;
 }
Пример #10
0
 private void BaseQuery()
 {
     Person pr = new Person();
     this.UpdatePerson(pr);
     if ((this.m_PersonPayer != pr) && (pr.LName != " "))
     {
         this.bsPerson.set_DataSource(Person.FindBy(pr));
         this.m_PersonPayer = pr;
     }
 }
Пример #11
0
 public void Selected(Person person)
 {
     this.SelectedPerson = person;
     if (this.OnPersonSelected != null)
     {
         this.OnPersonSelected(person);
     }
 }
Пример #12
0
 protected override void ClearText(object sender, System.EventArgs e)
 {
     this.SelectedPerson = Person.Null;
     if (this.OnPersonSelected != null)
     {
         this.OnPersonSelected(Person.Null);
     }
 }
Пример #13
0
 public PersonForm(Person person)
     : this()
 {
     this.pr = person;
 }
Пример #14
0
 public static ObjectList<AccountView> FindByAccount(AccountView accountView, Person person)
 {
     return Mappers.AccountViewMapper.FindBy(accountView, person);
 }
Пример #15
0
 private void selectPerson_OnPersonSelected(Person person)
 {
     this.selectOrganization.SelectedOrganizationOld = null;
     this.Selected(this.GetSelectedOwner());
 }
Пример #16
0
 private void selectOrganization_OnOrganizationSelected(Organization organization)
 {
     this.selectPerson.SelectedPerson = Person.Null;
     this.Selected(this.GetSelectedOwner());
 }
Пример #17
0
 public void LoadOwnerFromId(long id)
 {
     if (id == 0L)
     {
         this.m_Owner = Owner.Null;
         this.m_OwnerName = string.Empty;
     }
     else
     {
         this.m_Owner = Owner.FindById(id);
         if (!this.m_Owner.IsValid || (this.m_Owner == Owner.Null))
         {
             this.selectPerson.SelectedPerson = Person.Null;
             this.selectOrganization.SelectedOrganizationOld = null;
         }
         else if (this.m_Owner.IsPerson)
         {
             this.selectPerson.SelectedPerson = this.m_Owner.FindPerson();
             this.selectPerson.set_Text(this.selectPerson.SelectedPerson.FullName);
         }
         else
         {
             this.selectOrganization.SelectedOrganizationOld = this.m_Owner.FindOrganization();
             this.selectOrganization.set_Text(this.selectOrganization.SelectedOrganizationOld.LongName);
         }
     }
 }
Пример #18
0
 public static ObjectList<ApartmentView> FindByApartment(ApartmentView apartmentView, Person person)
 {
     return Mappers.ApartmentViewMapper.FindBy(apartmentView, person);
 }
Пример #19
0
 public SelectPerson()
 {
     this.m_Person = Person.Null;
 }
Пример #20
0
 public static ObjectList<Person> FindBy(Person person)
 {
     return Mappers.PersonMapper.FindBy(person);
 }
Пример #21
0
 private void AddPerson_Click(object sender, System.EventArgs e)
 {
     Person person = this.FillngPerson(1);
     if (person != null)
     {
         this.m_PersonPayer = person;
         base.set_DialogResult(System.Windows.Forms.DialogResult.OK);
         this.ResolutionQuery = false;
         base.Close();
     }
 }
Пример #22
0
 public static ObjectList<Person> FindBy(Person person, Apartment apartment)
 {
     return Mappers.PersonMapper.FindBy(person, apartment);
 }
Пример #23
0
 private void dgvPerson_CellContentClick(object sender, System.Windows.Forms.DataGridViewCellEventArgs e)
 {
     this.ChangePerson.set_Text("Подтвердить плательщика");
     this.m_PersonPayer = (Person) this.bsPerson.get_Current();
     this.ResolutionQuery = false;
     this.UpdateFields(this.m_PersonPayer);
     this.ChangePerson.set_Enabled(true);
 }
 public AccountPrecalcPenaltyRemissionReportForm()
 {
     this.m_Person = Person.Null;
     this.InitializeComponent();
 }
Пример #25
0
 private void UpdateFields(Person pr)
 {
     this.Update = true;
     this.tbxLName.set_Text(pr.LName.Trim());
     this.tbxFName.set_Text(pr.FName);
     this.tbxMName.set_Text(pr.MName);
     this.dbxBirthDay.Value = pr.BirthDate;
     this.tbxSerDoc.set_Text(pr.SerDoc);
     this.tbxNumDoc.set_Text(pr.NumDoc);
     this.tbxOrg.set_Text(pr.OrgDoc);
     this.dbxDoc.Value = pr.DateDoc;
     this.Update = false;
 }
Пример #26
0
 public PersonFamilyForm()
 {
     this.m_Person = Person.Null;
     this.m_Apartment = Apartment.Null;
     this.InitializeComponent();
 }
 private void cbPerson_SelectedIndexChanged(object sender, System.EventArgs e)
 {
     this.m_Person = this.cbPerson.get_SelectedItem() as Person;
 }
Пример #28
0
 public PersonFamilyForm(Person person)
     : this()
 {
     this.m_Person = person;
 }
 private void cbByPerson_CheckedChanged(object sender, System.EventArgs e)
 {
     this.cbPerson.set_Enabled(this.cbByPerson.get_Checked());
     this.m_Person = this.cbPerson.get_SelectedItem() as Person;
 }
Пример #30
0
 public PersonFamilyForm(Person person, Apartment apartment)
     : this()
 {
     this.m_Person = person;
     this.m_Apartment = apartment;
 }