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

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

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

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