Esempio n. 1
0
        public DeleteFemale(DatabaseFirst.Females female)
        {
            InitializeComponent();

            UserAgree.AcceptButton = Accept_btn;
            _female = female;
        }
Esempio n. 2
0
 public EditFemale(DatabaseFirst.Females female)
 {
     InitializeComponent();
     _female = female;
     GetFemale(female);
     NotifyUserAgree.AcceptButton = AcceptBtn;
 }
Esempio n. 3
0
        public PregnatFemale(DatabaseFirst.Females female)
        {
            _female = female;
            InitializeComponent();

            _observableCollection = new ObservableCollection <Inseminations>();
            GetActualInsemination();
        }
Esempio n. 4
0
        public FemalePage(DatabaseFirst.Females female)
        {
            _female = female;
            InitializeComponent();
            SetFemaleInfo(female);
            Births.SetFemale(_female);
            InseminationsPage.SetFemale(_female);
            SicksPage.SetFemale(_female);

            ValidateEventButtons(female);
        }
Esempio n. 5
0
        private void ValidateEventButtons(DatabaseFirst.Females female)
        {
            try
            {
                InseminationButton.IsEnabled = female.status == "Abortada" ||
                                               female.status == "Destetada" ||
                                               female.status == "Normal";

                PregnatButton.IsEnabled = female.status == "Inseminada";

                BirthButton.IsEnabled = female.status == "Preñada";

                MisbirthButton.IsEnabled = female.status == "Inseminada" ||
                                           female.status == "Preñada";

                WeaningButton.IsEnabled = female.status == "Madre";
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
            }
        }
Esempio n. 6
0
 public Births GetCurrentBirth(DatabaseFirst.Females female)
 {
     return(DbEntities.Births.FirstOrDefault(i => i.fem_code == female.code && i.status == "Actual"));
 }
Esempio n. 7
0
 public AddBirth(DatabaseFirst.Females female)
 {
     InitializeComponent();
     _female = female;
 }
 //This method set the female to make possible all the expected behaviour
 public void SetFemale(DatabaseFirst.Females female)
 {
     Female = female;
     GetInseminationsFromDatabase();
     SearchBox.SetView(InseminationsListView, CustomFilter);
 }
Esempio n. 9
0
 public MisbirthEvent(DatabaseFirst.Females female)
 {
     _female = female;
     InitializeComponent();
 }
Esempio n. 10
0
 public void SetFemale(DatabaseFirst.Females female)
 {
     Female = female;
     GetItemsFromDatabase();
     SearchBox.SetView(SicksListView, CustomFilter);
 }
Esempio n. 11
0
 public Inseminations GetLastSuccessInsemination(DatabaseFirst.Females female)
 {
     return(DbEntities.Inseminations.ToList().FindLast(i => i.fem_code == female.code && i.status == "Exitosa"));
 }
Esempio n. 12
0
 public virtual void OnFemaleDeleted(DatabaseFirst.Females female)
 {
     FemaleDeleted?.Invoke(this, new FemalesEventArgs {
         Female = female
     });
 }
Esempio n. 13
0
 private void SetFemaleInfo(DatabaseFirst.Females female)
 {
     CodeLabel.Content = female.code;
 }
Esempio n. 14
0
 private void GetFemale(DatabaseFirst.Females female)
 {
     //CodeTextBox.Text = _female.code;
     NewDateDatePicker.Text = _female.birthday;
 }
Esempio n. 15
0
 public virtual void OnStatusModified(DatabaseFirst.Females female)
 {
     StatusModified?.Invoke(this, new FemalesEventArgs {
         Female = female
     });
 }
Esempio n. 16
0
 public AddWeaning(DatabaseFirst.Females female)
 {
     _female = female;
     InitializeComponent();
 }
Esempio n. 17
0
 public AddInsemination(DatabaseFirst.Females female)
 {
     InitializeComponent();
     _female = female;
 }
Esempio n. 18
0
 public Inseminations GetCurrentInsemination(DatabaseFirst.Females female)
 {
     return(DbEntities.Inseminations.FirstOrDefault(i => i.fem_code == female.code && i.status == "Actual"));
 }