Beispiel #1
0
        public ActionResult UserPlusInfo()
        {
            UserPlus UserPlusInfo = new UserPlus();

            UserPlusInfo.Login          = "******";
            UserPlusInfo.RegId          = "f29be1af-e59cac9376df";
            UserPlusInfo.RegData        = "27-02-2017";
            UserPlusInfo.PhoneNumber    = "+380996000170";
            UserPlusInfo.Skype          = "iso.rl";
            UserPlusInfo.Email          = "*****@*****.**";
            UserPlusInfo.PersonalSite   = "vizatech.com";
            UserPlusInfo.Country        = "Ukraine";
            UserPlusInfo.LinkToFacebook = "facebook.com/nazar.syngaivskyi";
            return(View("~/Views/Shared/UserPage/UserPlusInfo.cshtml", UserPlusInfo));
        }
Beispiel #2
0
        /// <summary>
        /// Update info of user
        /// </summary>
        /// <param name="data">data</param>
        /// <returns>Number user is update</returns>
        public int PersonalSettingUserData(UserPlus data)
        {
            int res = 0;

            using (TransactionScope transaction = new TransactionScope())
            {
                res = _repository.PersonalSettingUserData(data);

                if (res > 0)
                {
                    transaction.Complete();
                }
            }
            return(res);
        }
        /// <summary>
        /// Check data by search condition
        /// </summary>
        /// <param name="condition">Search condition</param>
        /// <param name="user">User object</param>
        /// <returns>bool:true/false</returns>
        private bool checkSearchCondition(Condition condition, UserPlus user)
        {
            bool check = true;

            if (condition != null)
            {
                if (!string.IsNullOrEmpty(condition.DISPLAY_NAME)) // check name
                {
                    user.display_name  = !string.IsNullOrEmpty(user.display_name) ? user.display_name : string.Empty;
                    user.user_name_sei = !string.IsNullOrEmpty(user.user_name_sei) ? user.user_name_sei : string.Empty;
                    user.user_name_mei = !string.IsNullOrEmpty(user.user_name_mei) ? user.user_name_mei : string.Empty;
                    user.furigana_sei  = !string.IsNullOrEmpty(user.furigana_sei) ? user.furigana_sei : string.Empty;
                    user.furigana_mei  = !string.IsNullOrEmpty(user.furigana_mei) ? user.furigana_mei : string.Empty;

                    if (user.display_name.IndexOf(condition.DISPLAY_NAME) != -1 ||
                        user.user_name_sei.IndexOf(condition.DISPLAY_NAME) != -1 ||
                        user.user_name_mei.IndexOf(condition.DISPLAY_NAME) != -1 ||
                        user.furigana_sei.IndexOf(condition.DISPLAY_NAME) != -1 ||
                        user.furigana_mei.IndexOf(condition.DISPLAY_NAME) != -1)
                    {
                        check = true;
                    }
                    else
                    {
                        return(false);
                    }
                }

                if (condition.GROUP_ID != null) // check group
                {
                    if (condition.GROUP_ID != user.group_id)
                    {
                        return(false);
                    }
                }

                if (condition.POSITION_ID != null) // check position
                {
                    if (condition.POSITION_ID != user.position_id)
                    {
                        return(false);
                    }
                }

                if (!string.IsNullOrEmpty(condition.MAIL_ADDRESS)) // check mail address
                {
                    user.mail_address_1 = !string.IsNullOrEmpty(user.mail_address_1) ? user.mail_address_1 : string.Empty;
                    user.mail_address_2 = !string.IsNullOrEmpty(user.mail_address_2) ? user.mail_address_2 : string.Empty;

                    if (user.mail_address_1.IndexOf(condition.MAIL_ADDRESS) != -1 ||
                        user.mail_address_2.IndexOf(condition.MAIL_ADDRESS) != -1)
                    {
                        check = true;
                    }
                    else
                    {
                        return(false);
                    }
                }
            }

            return(check);
        }
 public PMS01002PersonalSettingViewModel()
 {
     USER_INFO = new UserPlus();
 }
Beispiel #5
0
 public PMS01002EditViewModel()
 {
     USER_INFO = new UserPlus();
 }
Beispiel #6
0
 /// <summary>
 /// Update Unit Price History
 /// </summary>
 /// <param name="data"></param>
 /// <param name="editor_id"></param>
 /// <param name="addNewUser"></param>
 public int UpdateUnitPriceHistory(UserPlus data, int editor_id)
 {
     return(_repository.UpdateUnitPriceHistory(data, editor_id));
 }