void SaveItem()
        {
            var    item     = new User();
            bool   isInsert = false;
            string url      = "";

            if (!IsInsert <User>())
            {
                item = GetCurrentItemReference <User>();
            }
            else
            {
                item.DateCreated = DateTime.Now;
                item.EnteredBy   = SecurityContextManager.Current.CurrentUser.ID;
                isInsert         = true;
                url                          = SecurityContextManager.Current.CurrentURL.Replace("New", "ID=");
                item.Password                = SecurityUtils.GetMd5Hash(SecurityUtils.GeneratePassword());
                item.PasswordAnswer          = SecurityUtils.GetMd5Hash("changeme");
                item.PasswordLastChangedDate = DateTime.Now;
                item.PasswordQuestion        = "The answer is changeme";
                item.LastLoginDate           = DateTime.Now;
            }
            item.ChangedBy    = SecurityContextManager.Current.CurrentUser.ID;
            item.Avatar       = _view.Avatar;
            item.CellPhone    = Utilities.FormatPhoneNumberForStorage(_view.CellPhone);
            item.FirstName    = _view.FirstName;
            item.HomePhone    = Utilities.FormatPhoneNumberForStorage(_view.HomePhone);
            item.DepartmentID = _view.DepartmentID;
            item.LastName     = _view.LastName;
            item.WorkPhone    = Utilities.FormatPhoneNumberForStorage(_view.WorkPhone);
            item.Description  = _view.Description;
            item.IsActive     = _view.IsActive;
            item.Email        = _view.Email;
            item.LastUpdated  = DateTime.Now;
            if (!item.UserName.Equals(_view.UserName))
            {
                if (SecurityServices.IsUsernameAvailable(_view.UserName))
                {
                    item.UserName = _view.UserName;
                }
            }
            item.MarkedForDeletion = _view.MarkedForDeletion;
            item.IMHandle          = _view.IMHandle;
            item.Name = _view.Name;
            new UserServices().Save(item);
            if (isInsert)
            {
                _view.NavigateTo(url + item.ID.ToString());
            }
            else
            {
                _view.LoadItem(item);
            }
        }