public DeleteFemale(DatabaseFirst.Females female) { InitializeComponent(); UserAgree.AcceptButton = Accept_btn; _female = female; }
public EditFemale(DatabaseFirst.Females female) { InitializeComponent(); _female = female; GetFemale(female); NotifyUserAgree.AcceptButton = AcceptBtn; }
public PregnatFemale(DatabaseFirst.Females female) { _female = female; InitializeComponent(); _observableCollection = new ObservableCollection <Inseminations>(); GetActualInsemination(); }
public FemalePage(DatabaseFirst.Females female) { _female = female; InitializeComponent(); SetFemaleInfo(female); Births.SetFemale(_female); InseminationsPage.SetFemale(_female); SicksPage.SetFemale(_female); ValidateEventButtons(female); }
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); } }
public Births GetCurrentBirth(DatabaseFirst.Females female) { return(DbEntities.Births.FirstOrDefault(i => i.fem_code == female.code && i.status == "Actual")); }
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); }
public MisbirthEvent(DatabaseFirst.Females female) { _female = female; InitializeComponent(); }
public void SetFemale(DatabaseFirst.Females female) { Female = female; GetItemsFromDatabase(); SearchBox.SetView(SicksListView, CustomFilter); }
public Inseminations GetLastSuccessInsemination(DatabaseFirst.Females female) { return(DbEntities.Inseminations.ToList().FindLast(i => i.fem_code == female.code && i.status == "Exitosa")); }
public virtual void OnFemaleDeleted(DatabaseFirst.Females female) { FemaleDeleted?.Invoke(this, new FemalesEventArgs { Female = female }); }
private void SetFemaleInfo(DatabaseFirst.Females female) { CodeLabel.Content = female.code; }
private void GetFemale(DatabaseFirst.Females female) { //CodeTextBox.Text = _female.code; NewDateDatePicker.Text = _female.birthday; }
public virtual void OnStatusModified(DatabaseFirst.Females female) { StatusModified?.Invoke(this, new FemalesEventArgs { Female = female }); }
public AddWeaning(DatabaseFirst.Females female) { _female = female; InitializeComponent(); }
public AddInsemination(DatabaseFirst.Females female) { InitializeComponent(); _female = female; }
public Inseminations GetCurrentInsemination(DatabaseFirst.Females female) { return(DbEntities.Inseminations.FirstOrDefault(i => i.fem_code == female.code && i.status == "Actual")); }