コード例 #1
0
        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;
            }

        }
コード例 #2
0
ファイル: AgentController.cs プロジェクト: cesarsan7/Source
        /// <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;
            }

           
            
        }