コード例 #1
0
        public DeleteFemale(DatabaseFirst.Females female)
        {
            InitializeComponent();

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

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

            ValidateEventButtons(female);
        }
コード例 #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);
            }
        }
コード例 #6
0
 public Births GetCurrentBirth(DatabaseFirst.Females female)
 {
     return(DbEntities.Births.FirstOrDefault(i => i.fem_code == female.code && i.status == "Actual"));
 }
コード例 #7
0
ファイル: AddBirth.xaml.cs プロジェクト: BrauCamaH/PigAdmind
 public AddBirth(DatabaseFirst.Females female)
 {
     InitializeComponent();
     _female = female;
 }
コード例 #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);
 }
コード例 #9
0
 public MisbirthEvent(DatabaseFirst.Females female)
 {
     _female = female;
     InitializeComponent();
 }
コード例 #10
0
ファイル: SicksPage.xaml.cs プロジェクト: BrauCamaH/PigAdmind
 public void SetFemale(DatabaseFirst.Females female)
 {
     Female = female;
     GetItemsFromDatabase();
     SearchBox.SetView(SicksListView, CustomFilter);
 }
コード例 #11
0
 public Inseminations GetLastSuccessInsemination(DatabaseFirst.Females female)
 {
     return(DbEntities.Inseminations.ToList().FindLast(i => i.fem_code == female.code && i.status == "Exitosa"));
 }
コード例 #12
0
 public virtual void OnFemaleDeleted(DatabaseFirst.Females female)
 {
     FemaleDeleted?.Invoke(this, new FemalesEventArgs {
         Female = female
     });
 }
コード例 #13
0
 private void SetFemaleInfo(DatabaseFirst.Females female)
 {
     CodeLabel.Content = female.code;
 }
コード例 #14
0
 private void GetFemale(DatabaseFirst.Females female)
 {
     //CodeTextBox.Text = _female.code;
     NewDateDatePicker.Text = _female.birthday;
 }
コード例 #15
0
 public virtual void OnStatusModified(DatabaseFirst.Females female)
 {
     StatusModified?.Invoke(this, new FemalesEventArgs {
         Female = female
     });
 }
コード例 #16
0
 public AddWeaning(DatabaseFirst.Females female)
 {
     _female = female;
     InitializeComponent();
 }
コード例 #17
0
 public AddInsemination(DatabaseFirst.Females female)
 {
     InitializeComponent();
     _female = female;
 }
コード例 #18
0
 public Inseminations GetCurrentInsemination(DatabaseFirst.Females female)
 {
     return(DbEntities.Inseminations.FirstOrDefault(i => i.fem_code == female.code && i.status == "Actual"));
 }