/// <summary> /// /// </summary> /// <param name="idUser"></param> /// <returns></returns> public IEnumerable<BookModel> getBookGetList(short idUser) { DGSDATAEntities entities = new DGSDATAEntities(); try { var lstEntity = entities.Book_GetList(idUser); if (lstEntity != null) { var result = (from data in lstEntity select new BookModel { IdBook = data.IdBook, Description = data.BookName }).ToList(); return result; } return null; } catch { throw; } }
/// <summary> /// Allow create a new agent /// </summary> /// <param name="model"> Objet type ModelAgent</param> /// <param name="prmOutIdAgent">New id agent record</param> /// <param name="prmOutResult">Result the process created</param> public void addAgentController(AgentModel model, ref ObjectParameter prmOutIdAgent, ref ObjectParameter prmOutResult) { int res = 0; Repository<AGENT> objInsert = new Repository<AGENT>(); //Repository<AgentInsert> objInsert = new Repository<AgentInsert>(); DGSDATAEntities entities = new DGSDATAEntities(); try { res = entities.Agent_Insert( model.Enable, model.DontXferPlayerActivity, //prmDontXfer model.IsDistributor, model.IdUser, // prmIdUser, model.Distributor, model.Makeup, model.CommSports, model.CommCasino, model.CommHorses, model.PerHeadSports, model.PerHeadCasino, model.PerHeadHorses, model.IdAgentType, model.IdCurrency, model.IdBook, model.IdGrouping, model.Agent, model.Name, model.Password, model.City, model.State, model.Country, model.Address1, model.Address2, model.Email, model.Phone, model.Fax, model.Zip, model.OnlineAccess, model.OnlineMessage, model.IdLineType, prmOutIdAgent, prmOutResult); //object obj = new object[] { prmOutIdAgent, prmOutResult }; //return obj; } catch { throw; } }
public void createAgent(AgentModel model) { Repository<AgentInsert> objInsert = new Repository<AgentInsert>(); DGSDATAEntities entities = new DGSDATAEntities(); try { object obj = new object(); obj = entities.Agent_Insert(true, true, true, 1, 1.0, 1, 1, 1, 2.0, 3.0, 4.0, 3, 4, 2, 1, "", "name", "pass", "city", "state", "coontry", "addres1", "addres2", "email" , "", "", "zip", true, "", obj); var result = entities.Agent_Insert(model.Enable, model.DontXferPlayerActivity, model.IsDistributor, model.IdUser, model.Makeup, model.CommSports, model.CommCasino, model.CommHorses, model.PerHeadSports, model.PerHeadCasino, model.PerHeadHorses, model.IdAgentType, model.IdCurrency, model.IdBook, model.IdGrouping, model.Agent, model.Name, model.Password, model.City, model.State, model.Country, model.Address1, model.Address2, model.Email, model.Phone, model.Fax, model.Zip, model.OnlineAccess, model.OnlineMessage, null ); } catch (Exception exc) { throw; } }
public void usersGetIDController(string loginName, ref ObjectParameter prmIdUser) { //short idUser = -1; DGSDATAEntities entities = new DGSDATAEntities(); try { entities.Users_GetID(loginName, prmIdUser); // return idUser; } catch { throw; } }
/// <summary> /// Allow delete a record de Agent and /// </summary> /// <param name="idAgent"></param> /// <param name="idUser"></param> /// <returns></returns> public int deleteAgentController(int idAgent , short idUser) { int result = 0; DGSDATAEntities entities = new DGSDATAEntities(); try { result = entities.Agent_Delete(idAgent, idUser); return result; } catch { throw; } }
/// <summary> /// /// </summary> /// <param name="idAgent"></param> /// <returns></returns> public IEnumerable<dynamic> agentLineTypesGetListAddedcontroller(int idAgent) { // Repository<Agent_GetPlayers_Result> objResult = new Repository<Agent_GetPlayers_Result>(); DGSDATAEntities entities = new DGSDATAEntities(); try { var lstEntity = entities.AgentLineTypes_GetListAdded(idAgent); if (lstEntity != null) { var result = (from data in lstEntity select new { data.IdLineType, data.LineType }).ToList(); return result; } return null; } catch { throw; } }
/// <summary> /// /// </summary> /// <returns></returns> public IEnumerable<dynamic> agentRightsGetListController() { // Repository<Agent_GetPlayers_Result> objResult = new Repository<Agent_GetPlayers_Result>(); DGSDATAEntities entities = new DGSDATAEntities(); try { var lstEntity = entities.AgentRights_GetList(); if (lstEntity != null) { var result = (from data in lstEntity select new { Category=data.Category, Description=data.Description, IdForm=data.IdForm, IdRight=data.IdRight }).ToList(); return result; } return null; } catch { throw; } }
/// <summary> /// allows get player acording idagent /// </summary> /// <param name="Idagent"></param> /// <returns></returns> public IEnumerable<dynamic> agentGetPlayersIDController(int Idagent) { // Repository<Agent_GetPlayers_Result> objResult = new Repository<Agent_GetPlayers_Result>(); DGSDATAEntities entities = new DGSDATAEntities(); try { var lstEntity = entities.Agent_GetPlayersID(Idagent); if (lstEntity != null) { var result = (from data in lstEntity select new { data.Value }).ToList(); return result; } return null; } catch { throw; } }
/// <summary> /// All get the game Statistics /// </summary> /// <param name="idAgent"></param> /// <returns></returns> public IEnumerable<dynamic> agentGetStatisticsController(int idAgent) { // Repository<Agent_GetPlayers_Result> objResult = new Repository<Agent_GetPlayers_Result>(); DGSDATAEntities entities = new DGSDATAEntities(); try { var lstEntity = entities.Agent_GetStatistics( idAgent); if (lstEntity != null) { var result = (from data in lstEntity select new { AccountOpened=data.AccountOpened, CurrentBalance = data.CurrentBalance, IdAgent = data.IdAgent, LastModification = data.LastModification, LastModificationUser = data.LastModificationUser, LastWeek = data.LastWeek, LastWeekMakeUp = data.LastWeekMakeUp, LifeTimeComm = data.LifeTimeComm, LifeTimeLose = data.LifeTimeLose, LifetimeWin = data.LifetimeWin, MakeUp = data.MakeUp, ThisWeek = data.ThisWeek, YTDComm = data.YTDComm, YTDWin = data.YTDWin }).ToList(); return result; } return null; } catch { throw; } }
/// <summary> /// allows for the information of the agent, which is sent as a parameter /// </summary> /// <param name="agent"></param> /// <param name="idUser"></param> /// <returns></returns> public IEnumerable<dynamic> agentGetInfoController(string agent, short idUser) { Repository<Agent_GetInfo_Result> objResult = new Repository<Agent_GetInfo_Result>(); DGSDATAEntities entities = new DGSDATAEntities(); try { var lstEntity = entities.Agent_GetInfo(agent, idUser); if (lstEntity != null) { var result = (from datos in lstEntity select new { Address1 = datos.Address1, Address2 = datos.Address2, Agent = datos.Agent, City = datos.City, CommCasino = datos.CommCasino, CommHorses = datos.CommHorses, CommSports = datos.CommSports, Country = datos.Country, Currency = datos.Currency, Distributor = datos.Distributor, DontXferPlayerActivity = datos.DontXferPlayerActivity, Email = datos.Email, Enable = datos.Enable, Fax = datos.Fax, IdAgent = datos.IdAgent, IdAgentType = datos.IdAgentType, IdBook = datos.IdBook, IdCurrency = datos.IdCurrency, IdGrouping = datos.IdGrouping, IdLineType = datos.IdLineType, IsDistributed = datos.IsDistributed, IsDistributor = datos.IsDistributor, LastModification = datos.LastModification, LastModificationUser = datos.LastModificationUser, Name = datos.Name, OnlineAccess = datos.OnlineAccess, OnlineMessage = datos.OnlineMessage, Password = datos.Password, PerHeadCasino = datos.PerHeadCasino, PerHeadHorses = datos.PerHeadHorses, PerHeadSports = datos.PerHeadSports, Phone = datos.Phone, State = datos.State, Symbol = datos.Symbol, Zip = datos.Zip }).ToList(); return result; } return null; } catch { throw; } }
/// <summary> /// Method constructor the class BookController /// </summary> public PlayerController() { entities = new DGSDATAEntities(); }
public IEnumerable<dynamic> playerGetInfoController(string player,short idUser) { Repository<Agent_FindList_Result> objResult = new Repository<Agent_FindList_Result>(); DGSDATAEntities entities = new DGSDATAEntities(); try { var lstEntity = entities.Player_GetInfo(player, idUser); if (lstEntity != null) { var result = (from data in lstEntity select new { IdPlayer = data.IdPlayer, IdLineType = data.IdLineType, IdOffice = data.IdOffice, IdAgent = data.IdAgent, IdCurrency = data.IdCurrency, IdGrouping = data.IdGrouping, IdSource = data.IdSource, IdProfile = data.IdProfile, IdProfileLimits = data.IdProfileLimits, IdPlayerRate = data.IdPlayerRate, IdBook = data.IdBook, IdTimeZone = data.IdTimeZone, IdLanguage = data.IdLanguage, ScheduleStyle = data.ScheduleStyle, Player = data.Player, Password = data.Password, Name = data.Name, LastName = data.LastName, LastName2 = data.LastName2, Title = data.Title, Address1 = data.Address1, Address2 = data.Address2, City = data.City, State = data.State, Country = data.Country, Zip = data.Zip, Phone = data.Phone, Fax = data.Fax, Email = data.Email, Status = data.Status, AutoPay = data.AutoPay, BalanceChecked = data.BalanceChecked, CreditLimit = data.CreditLimit, NoLimit = data.NoLimit, TempCredit = data.TempCredit, SoftLimitPercent = data.SoftLimitPercent, TempCreditExpire = data.TempCreditExpire, OnlineAccess = data.OnlineAccess, OnlinePassword = data.OnlinePassword, OnlineMessage = data.OnlineMessage, OnlineMaxWager = data.OnlineMaxWager, OnlineMinWager = data.OnlineMinWager, MaxWager = data.MaxWager, MinWager = data.MinWager, CapPerGame = data.CapPerGame, ChartPercent = data.ChartPercent, MasterChart = data.MasterChart, Master = data.Master, FlagMessage = data.FlagMessage, IdFlagMessageType = data.IdFlagMessageType, MaxActionPoints = data.MaxActionPoints, BonusPointsStatus = data.BonusPointsStatus, BonusPointsExpire = data.BonusPointsExpire, BonusPointsStart = data.BonusPointsStart, LineStyle = data.LineStyle, NHLLine = data.NHLLine, MLBLine = data.MLBLine, PitcherDefault = data.PitcherDefault, DuplicatedBets = data.DuplicatedBets, DuplicatedBetsOnline = data.DuplicatedBetsOnline, FreePlayAmount = data.FreePlayAmount, FreePlayMessage = data.FreePlayMessage, ScheduleFB = data.ScheduleFB, ScheduleBB = data.ScheduleBB, ScheduleHK = data.ScheduleHK, ScheduleBS = data.ScheduleBS, SettledFigure = data.SettledFigure, ShowInTicker = data.ShowInTicker, EPOSPlayer = data.EPOSPlayer, EnableHorses = data.EnableHorses, EnableCasino = data.EnableCasino, EnableSports = data.EnableSports, EnableCards = data.EnableCards, DateOfBirth = data.DateOfBirth, SignUpIP = data.SignUpIP, SecQuestion = data.SecQuestion, SecAnswer = data.SecAnswer, HoldBets = data.HoldBets, HoldDelay = data.HoldDelay, LastModificationUser = data.LastModificationUser , Currency = data.Currency, Symbol =data.Symbol, AgentEnabled =data.AgentEnabled, DontXFerPlayerActivity =data.DontXFerPlayerActivity }).ToList(); return result; } return null; } catch { throw; } }
/// <summary> /// It allows to obtain the notes associated with an agent /// </summary> /// <param name="idBook"></param> /// <returns></returns> public IEnumerable<dynamic> agentGetNotesController(int idAgent) { Repository<Agent_GetNotes_Result> objResult = new Repository<Agent_GetNotes_Result>(); DGSDATAEntities entities = new DGSDATAEntities(); try { var lstEntity = entities.Agent_GetNotes(idAgent); if (lstEntity != null) { var result = (from data in lstEntity select new { IdAgent=data.IdAgent, Notes1=data.Notes1, Notes2=data.Notes2, Notes3=data.Notes3 }).ToList(); return result; } return null; } catch { throw; } }
/// <summary> /// allows get a list the information of the distributors agents , according parameter idAgent sent /// </summary> /// <param name="idAgent"></param> /// <returns></returns> public IEnumerable<dynamic> agentGetInfoDistributorController(int idAgent) { // Repository<Agent_GetInfoDistributor_Result> objResult = new Repository<Agent_GetInfoDistributor_Result>(); DGSDATAEntities entities = new DGSDATAEntities(); try { var lstEntity = entities.Agent_GetInfoDistributor(idAgent); if (lstEntity != null) { var result = (from datos in lstEntity select new { datos.Agent, datos.CommCasino, datos.CommHorses, datos.CommSports, datos.Distributor, datos.DontXferPlayerActivity, datos.Enable, datos.IdAgent, datos.IdAgentType, datos.IdBook, datos.IdCurrency, datos.IdDistributor, datos.IdGrouping, datos.IsDistributor, datos.PerHeadCasino, datos.PerHeadHorses, datos.PerHeadSports }).ToList(); return result; } return null; } catch { throw; } }
/// <summary> /// /// </summary> /// <param name="idUser"></param> /// <returns></returns> public IEnumerable<dynamic> agentGetListController(short idUser) { Repository<Agent_GetList_Result> objResult = new Repository<Agent_GetList_Result>(); DGSDATAEntities entities = new DGSDATAEntities(); try { var lstEntity = entities.Agent_GetList(idUser); if (lstEntity != null) { var result = (from data in lstEntity select new { data.Agent, data.AgentStatus, data.IdAgent, data.IdLineType }).ToList(); return result; } return null; } catch { throw; } }
/// <summary> /// allows get a list the information of the Distributor agents, according parameters sent /// </summary> /// <param name="idAgent"></param> /// <returns></returns> public IEnumerable<dynamic> agentGetDistributorController(int idAgent) { // Repository<Agent_GetDistributor_Result> objResult = new Repository<Agent_GetDistributor_Result>(); DGSDATAEntities entities = new DGSDATAEntities(); try { var lstEntity = entities.Agent_GetDistributor(idAgent); if (lstEntity != null) { var result = (from datos in lstEntity select new { Distributor=datos.Distributor, IsDistributor=datos.IsDistributor }).ToList(); return result; } return null; } catch { throw; } }
/// <summary> /// allows get a list the information of the agents, according parameters sent /// </summary> /// <param name="idAgent"></param> /// <param name="decimasl"></param> /// <param name="trunc"></param> /// <returns></returns> public IEnumerable<dynamic> agentGetAgentsListController (int? idAgent ,byte? decimasl, byte? trunc) { Repository<Agent_GetAgentsList_Result> objResult = new Repository<Agent_GetAgentsList_Result>(); DGSDATAEntities entities = new DGSDATAEntities(); try { var lstEntity = entities.Agent_GetAgentsList(idAgent, decimasl, trunc); if (lstEntity != null) { var result = (from datos in lstEntity select new { IdAgent=datos.IdAgent, LifeTimeNet=datos.LifeTimeNet, MakeUp=datos.MakeUp, PerHeadCasino=datos.PerHeadCasino, PerHeadHorses=datos.PerHeadHorses, PerHeadSportsdatos=datos.PerHeadSports }).ToList(); return result; } return null; } catch { throw; } }
/// <summary> /// allows get a list the information of the agents, according parameters sent /// </summary> /// <param name="agent"></param> /// <param name="name"></param> /// <param name="idUser"></param> /// <returns></returns> public IEnumerable<dynamic> agentFindListController(string agent, string name,short idUser) { Repository<Agent_FindList_Result> objResult = new Repository<Agent_FindList_Result>(); DGSDATAEntities entities = new DGSDATAEntities(); try { var lstEntity = entities.Agent_FindList(agent, name, idUser); if (lstEntity != null) { var result = (from datos in lstEntity select new { Agent =datos.Agent, IdAgent=datos.IdAgent }).ToList(); return result; } return null; } catch { throw; } }
/// <summary> /// Method constructor the class BookController /// </summary> public BookController() { entities = new DGSDATAEntities(); }
/// <summary> /// allow get information the Statistic player associated a agent /// </summary> /// <param name="idAgent"></param> /// <returns></returns> public IEnumerable<dynamic> agentGetPlayersListController(int Idagent, byte decimals, byte trunc, short idCurrency) { Repository<Agent_GetPlayersList_Result> objResult = new Repository<Agent_GetPlayersList_Result>(); DGSDATAEntities entities = new DGSDATAEntities(); try { var lstEntity = entities.Agent_GetPlayersList(Idagent, decimals, trunc, idCurrency); if (lstEntity != null) { var result = (from data in lstEntity select new { CreditLimit=data.CreditLimit, Currency=data.Currency, CurrentBalance=data.CurrentBalance, EnableCasino=data.EnableCasino, EnableHorses=data.EnableHorses, EnableSports=data.EnableSports, IdPlayer=data.IdPlayer, LastWager=data.LastWager, LifeTimeNet=data.LifeTimeNet, Name=data.Name, Player=data.Player, Status=data.Status, TotalCreditLimit=data.TotalCreditLimit, TotalCurrentBalance=data.TotalCurrentBalance }).ToList(); return result; } return null; } catch { throw; } }
/// <summary> /// allows get a list the information of the agents , according parameter idBook /// </summary> /// <param name="idBook"></param> /// <returns></returns> public IEnumerable<dynamic> agentGetListByBookController(short idBook) { Repository<Agent_GetListByBook_Result> objResult = new Repository<Agent_GetListByBook_Result>(); DGSDATAEntities entities = new DGSDATAEntities(); try { var lstEntity = entities.Agent_GetListByBook(idBook); if (lstEntity != null) { var result = (from data in lstEntity select new { Agent=data.Agent, IdAgent=data.IdAgent }).ToList(); return result; } return null; } catch { throw; } }
/// <summary> /// Allow update a record the agent /// </summary> /// <param name="model"></param> public int updateAgentController (AgentModel model) { int res = 0; DGSDATAEntities entities = new DGSDATAEntities(); try { res = entities.Agent_Update( model.IdAgent , model.Enable , model.DontXferPlayerActivity,//prmDontXfer model.IsDistributor , model.IdUser , model.Distributor , model.Makeup , model.CommSports , model.CommCasino , model.CommHorses , model.PerHeadSports , model.PerHeadCasino , model.PerHeadHorses , model.IdAgentType , model.IdCurrency , model.IdBook , model.IdGrouping , model.Agent , model.Name , model.Password , model.City , model.State , model.Country , model.Address1 , model.Address2 , model.Email , model.Phone , model.Fax , model.Zip , model.OnlineAccess, model.OnlineMessage , model.IdLineType ); return res; } catch { throw; } }