Example #1
0
        public DeleteFemale(DatabaseFirst.Females female)
        {
            InitializeComponent();

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

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

            ValidateEventButtons(female);
        }
Example #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);
            }
        }
Example #6
0
 public Births GetCurrentBirth(DatabaseFirst.Females female)
 {
     return(DbEntities.Births.FirstOrDefault(i => i.fem_code == female.code && i.status == "Actual"));
 }
Example #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);
 }
Example #9
0
 public MisbirthEvent(DatabaseFirst.Females female)
 {
     _female = female;
     InitializeComponent();
 }
Example #10
0
 public void SetFemale(DatabaseFirst.Females female)
 {
     Female = female;
     GetItemsFromDatabase();
     SearchBox.SetView(SicksListView, CustomFilter);
 }
Example #11
0
 public Inseminations GetLastSuccessInsemination(DatabaseFirst.Females female)
 {
     return(DbEntities.Inseminations.ToList().FindLast(i => i.fem_code == female.code && i.status == "Exitosa"));
 }
Example #12
0
 public virtual void OnFemaleDeleted(DatabaseFirst.Females female)
 {
     FemaleDeleted?.Invoke(this, new FemalesEventArgs {
         Female = female
     });
 }
Example #13
0
 private void SetFemaleInfo(DatabaseFirst.Females female)
 {
     CodeLabel.Content = female.code;
 }
Example #14
0
 private void GetFemale(DatabaseFirst.Females female)
 {
     //CodeTextBox.Text = _female.code;
     NewDateDatePicker.Text = _female.birthday;
 }
Example #15
0
 public virtual void OnStatusModified(DatabaseFirst.Females female)
 {
     StatusModified?.Invoke(this, new FemalesEventArgs {
         Female = female
     });
 }
Example #16
0
 public AddWeaning(DatabaseFirst.Females female)
 {
     _female = female;
     InitializeComponent();
 }
Example #17
0
 public AddInsemination(DatabaseFirst.Females female)
 {
     InitializeComponent();
     _female = female;
 }
Example #18
0
 public Inseminations GetCurrentInsemination(DatabaseFirst.Females female)
 {
     return(DbEntities.Inseminations.FirstOrDefault(i => i.fem_code == female.code && i.status == "Actual"));
 }