예제 #1
0
        public static int InsertToDb(Pro pro)
        {
            if (RepositoryClientInfo.ClientInfos.Count == 0)
            {
                RepositoryClientInfo.Sync();
            }

            pro.Nclient                        = GetMaxNclientWithTypeClient2() + 10;
            pro.Password                       = string.Empty;
            pro.CountrysCustomerId             = new Guid("F3D5541D-9860-4D93-ADCF-18F631ADAD74");
            pro.FavoritesProductAutoCustomerId = Guid.Empty;

            using (var connection = ConnectionFactory.CreateConnection())
                return(connection.Execute(InsertQuery, pro));
        }
예제 #2
0
        public static ClientInfo GetClientInfoById(Guid clientCustomerId)
        {
            var info = RepositoryClientInfo.GetOneByNumber(clientCustomerId);

            if (info != null)
            {
                Client.NameFirst = info.Name;
                Client.NameLast  = info.Surname;
            }
            else
            {
                Client.NameFirst = " Inconnue ";
                Client.NameLast  = "";
            }
            return(info);
        }