public DogHistory() : base() { _dogs = new Fpp.Data.Dogs(ModuleSettings); }
public static void Delete(int DogId) { String moduleSettings = ModuleConfig.GetSettings(); Fpp.Data.Dogs dogData = new Fpp.Data.Dogs(moduleSettings); dogData.DeleteDogGrade(DogId); }
public int Save() { Fpp.Data.Dogs dog = new Fpp.Data.Dogs(ModuleSettings); if (ID > -1) { dog.Update(ID, _KCName, _KCNumber, _petName, _DoB, _sex, _height, _grade, _dogIcon, _breed, _breedType, _rescue, _dogColour, _altHandlerID, _ownerID); } else { ID = dog.Add(_HandlerID, _KCName, _KCNumber, _petName, _DoB, _sex, _height, _grade, _dogIcon, _breed, _breedType, _rescue, _dogColour, _altHandlerID, _ownerID); } return ID; }
public static List<DogRingNumbers> GetRingNumbersForShow(int ShowID, int UserID) { List<DogRingNumbers> ret = new List<DogRingNumbers>(); String moduleSettings = ModuleConfig.GetSettings(); Fpp.Data.Dogs d = new Fpp.Data.Dogs(moduleSettings); var ds = d.GetRingNumbersForShow(ShowID, UserID); foreach (DataRow row in ds.Tables[0].Rows) { ret.Add(new DogRingNumbers { DogId = Convert.ToInt32(row["DogId"]), RingNo = Convert.ToInt32(row["RingNumber"]) }); } return ret; }
public static void UpdateAltHandler(int HandlerID, int AltHandlerID) { String moduleSettings = ModuleConfig.GetSettings(); Fpp.Data.Dogs dogData = new Fpp.Data.Dogs(moduleSettings); dogData.UpdateAltHandler(HandlerID, AltHandlerID); }
public static List<Dogs> GetAllDogsForHandler(int HandlerID, DateTime ShowStartDate) { String moduleSettings = ModuleConfig.GetSettings(); Fpp.Data.Dogs dogData = new Fpp.Data.Dogs(moduleSettings); List<Dogs> dogList = new List<Dogs>(); DataSet ds = dogData.GetAllDogsForHandler(HandlerID, ShowStartDate); foreach (DataRow row in ds.Tables[0].Rows) { var d = new Dogs(row); d.Wins = DogHistory.GetRecordedWins(d.ID); dogList.Add(d); } return dogList; }
public static List<Dogs> GetAllDogsForHandlerAtShow(int ShowID, int HandlerID) { Shows thisShow = new Shows(ShowID); String moduleSettings = ModuleConfig.GetSettings(); Fpp.Data.Dogs dogData = new Fpp.Data.Dogs(moduleSettings); List<Dogs> dogList = new List<Dogs>(); UserShows us = new UserShows(HandlerID, ShowID); if (us.ID != -1) { DataSet ds = dogData.GetAllDogsForHandler(HandlerID, thisShow.ShowDate); foreach (DataRow row in ds.Tables[0].Rows) { dogList.Add(new Dogs(row)); } } return dogList; }
public Dogs(DataRow row) : base() { _dogs = new Fpp.Data.Dogs(ModuleSettings); init(); LoadFromRow(row); }
public static void DeleteAllDogs(int HandlerID) { String moduleSettings = ModuleConfig.GetSettings(); Fpp.Data.Dogs dogData = new Fpp.Data.Dogs(moduleSettings); dogData.DeleteAll(HandlerID); }
public DogGrades() : base() { _dogs = new Fpp.Data.Dogs(ModuleSettings); }
public Dogs(int DogID, DateTime ShowDateTime) : base() { _dogs = new Fpp.Data.Dogs(ModuleSettings); init(); ID = DogID; DataSet ds = _dogs.GetDog(ID, ShowDateTime); if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) LoadFromRow(ds.Tables[0].Rows[0]); }
public Dogs() : base() { _dogs = new Fpp.Data.Dogs(ModuleSettings); init(); }
public static List<UpgradeDogView> GetRecordedWins(int DogId) { String moduleSettings = ModuleConfig.GetSettings(); Fpp.Data.Dogs dogData = new Fpp.Data.Dogs(moduleSettings); DataSet ds = dogData.GetRecordedWins(DogId); List<UpgradeDogView> wins = new List<UpgradeDogView>(); foreach (DataRow row in ds.Tables[0].Rows) { wins.Add(new UpgradeDogView { Id = Convert.ToInt32(row["DogHistoryId"]), WinDate = Convert.ToDateTime(row["WinDate"]), ShowName = row["ShowName"].ToString(), ClassWon = row["ClassWon"].ToString(), UpgradeType = (row["UpgradeType"].Equals(DBNull.Value) ? 1 : Convert.ToInt32(row["UpgradeType"])), DateOfWin = row["DateOfWin"].ToString(), NewGrade = Convert.ToInt32(row["NewGrade"]) }); } return wins; }
public static void DeleteCurrentWins(int dogId) { String moduleSettings = ModuleConfig.GetSettings(); Fpp.Data.Dogs dogData = new Fpp.Data.Dogs(moduleSettings); dogData.DeleteCurrentWins(dogId); }
public static void AddChampWins(UpgradeDogView upgradeDogView) { String moduleSettings = ModuleConfig.GetSettings(); Fpp.Data.Dogs dogData = new Fpp.Data.Dogs(moduleSettings); int dogHistoryID; dogHistoryID = dogData.AddToDogHistory(upgradeDogView); DateTime activeDate = upgradeDogView.WinDate.Add(new TimeSpan(25, 0, 0, 0)); }
public static int Add(UpgradeDogView upgradeDogView) { String moduleSettings = ModuleConfig.GetSettings(); Fpp.Data.Dogs dogData = new Fpp.Data.Dogs(moduleSettings); int dogHistoryID; dogHistoryID = dogData.AddToDogHistory(upgradeDogView); DateTime activeDate = DateTime.Now; if (upgradeDogView.UpgradeType < 10) { activeDate = upgradeDogView.WinDate.Add(new TimeSpan(25, 0, 0, 0)); if (upgradeDogView.UpgradeType == 1) { activeDate = DateTime.Now; } } dogData.AddToDogGrades(upgradeDogView.DogId, activeDate, upgradeDogView.NewGrade, upgradeDogView.UpgradeType); return dogHistoryID; }