// Insert User vào Database.
        public void InsertUser(string username, string password, string email, int provinceID, int districtID, int detailprovinceID,int roleID,out MembershipCreateStatus status)
        {
            try
            {
                TTTV__Users user = new TTTV__Users();
                TTTV__UserInformation info = new TTTV__UserInformation();

                user.Username = username;
                user.Password = password;
                user.Email = email;
                user.RoleId = roleID;
                info.Username = username;
                info.ProvinceID = provinceID;
                info.DistrictID = districtID;
                info.ProvinceDetailID = detailprovinceID;
                db.TTTV__Users.AddObject(user);
                db.TTTV__UserInformation.AddObject(info);
                db.SaveChanges();
                status = MembershipCreateStatus.Success;
            }
            catch (Exception ex)
            {
                status = MembershipCreateStatus.ProviderError;
                throw ex;
            }
        }
        // Tao user
        public void InsertUser(string username, string password, string email, int provinceID, int districtID, int detailprovinceID, int roleID, string question, string answear, string companyname, string businesscode, string phone, string mobile, string CMND, string name, int age, string address, string subaddress, out MembershipCreateStatus status)
        {
            try
            {

                TTTV__Users user = new TTTV__Users();
                TTTV__UserInformation info = new TTTV__UserInformation();

                user.Username = username;
                user.Password = password;
                user.Email = email;
                user.RoleId = roleID;
                user.ForgotPassQuestion = question;
                user.ForgotPassAnswer = answear;
                info.Username = username;
                info.ProvinceID = provinceID;
                info.DistrictID = districtID;
                info.ProvinceDetailID = detailprovinceID;
                info.CompanyName = companyname;
                info.BusinessCode = businesscode;
                info.Phone = phone;
                info.Mobile = mobile;
                info.PersonCode = CMND;
                info.UserFullName = name;
                info.Age = age;
                info.Address = address;
                info.SubAddress = subaddress;
                db.TTTV__Users.AddObject(user);
                db.TTTV__UserInformation.AddObject(info);
                db.SaveChanges();
                status = MembershipCreateStatus.Success;

            }
            catch (Exception ex)
            {
                CustomException cex = new CustomException();
                cex.Details = ex.Message;
                cex.Issue = "Trùng tên đăng nhập";
                //status = MembershipCreateStatus.ProviderError;
                throw new FaultException<CustomException>(cex, new FaultReason(cex.Issue));

            }
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the TTTV__UserInformation EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToTTTV__UserInformation(TTTV__UserInformation tTTV__UserInformation)
 {
     base.AddObject("TTTV__UserInformation", tTTV__UserInformation);
 }
 /// <summary>
 /// Create a new TTTV__UserInformation object.
 /// </summary>
 /// <param name="username">Initial value of the Username property.</param>
 /// <param name="provinceID">Initial value of the ProvinceID property.</param>
 /// <param name="provinceDetailID">Initial value of the ProvinceDetailID property.</param>
 /// <param name="districtID">Initial value of the DistrictID property.</param>
 public static TTTV__UserInformation CreateTTTV__UserInformation(global::System.String username, global::System.Int32 provinceID, global::System.Int32 provinceDetailID, global::System.Int32 districtID)
 {
     TTTV__UserInformation tTTV__UserInformation = new TTTV__UserInformation();
     tTTV__UserInformation.Username = username;
     tTTV__UserInformation.ProvinceID = provinceID;
     tTTV__UserInformation.ProvinceDetailID = provinceDetailID;
     tTTV__UserInformation.DistrictID = districtID;
     return tTTV__UserInformation;
 }