public static void ModelToViewModel(Franchisee _franchisee, TBL_FRANCHISEE franchisee, TBL_FRANCHISEE_USERS franchiseeUser)
 {
     _franchisee.Address1 = franchisee.Address1;
     _franchisee.Address2 = franchisee.Address2;
     _franchisee.CoachID = franchisee.CoachID;
     _franchisee.City = franchisee.City;
     _franchisee.State = franchisee.State;
     _franchisee.Zip = franchisee.Zip;
     _franchisee.CountryID = franchisee.CountryID.Value;
     _franchisee.ID = franchisee.ID;
     _franchisee.Name = franchisee.Name;
     _franchisee.PhoneNumber = franchisee.PhoneNumber;
     _franchisee.FaxNumber = franchisee.FaxNumber;
     _franchisee.WebAddress = franchisee.WebAddress;
     _franchisee.Email = franchisee.EmailAddress;
     _franchisee.FranchiseeUser.FranchiseeID = franchiseeUser.FranchiseeID;
     _franchisee.FranchiseeUser.ADDRESS = franchiseeUser.ADDRESS;
     _franchisee.FranchiseeUser.City = franchiseeUser.City;
     _franchisee.FranchiseeUser.ContactNumber = franchiseeUser.ContactNumber;
     _franchisee.FranchiseeUser.FirstName = franchiseeUser.FirstName;
     _franchisee.FranchiseeUser.IsEmailSubscription = franchiseeUser.IsEmailSubscription.Value;
     _franchisee.FranchiseeUser.LastName = franchiseeUser.LastName;
     _franchisee.FranchiseeUser.State = franchiseeUser.State;
     if(franchiseeUser.CountryID.HasValue)
         _franchisee.FranchiseeUser.CountryID = franchiseeUser.CountryID.Value;
     _franchisee.FranchiseeUser.UserID = franchiseeUser.UserID.ToString();
     _franchisee.FranchiseeUser.Zip = franchiseeUser.Zip;
 }
 public static void ViewModelToModel(TBL_FRANCHISEE _franchisee, Franchisee franchisee)
 {
     _franchisee.CoachID = franchisee.CoachID;
     _franchisee.Name = franchisee.Name;
     _franchisee.Address1 = franchisee.Address1;
     _franchisee.Address2 = franchisee.Address2;
     _franchisee.City = franchisee.City;
     _franchisee.PhoneNumber = franchisee.PhoneNumber;
     _franchisee.FaxNumber = franchisee.FaxNumber;
     _franchisee.EmailAddress = franchisee.Email;
     _franchisee.WebAddress = franchisee.WebAddress;
     _franchisee.State = franchisee.State;
     _franchisee.Zip = franchisee.Zip;
     _franchisee.LastUpdatedBy = _franchisee.CreatedBy;
     if(franchisee.CountryID > 0)
         _franchisee.CountryID = franchisee.CountryID;
 }