Ejemplo n.º 1
0
        /// <summary>
        /// ViewAdataから値を受け取ります。
        /// </summary>
        /// <param name="viewAdatas">ViewAdatasを設定します。</param>
        public void SetViewDatas(
            [param: Required] Common.ViewAdatas viewAdatas
            )
        {
            // nullチェック
            if (viewAdatas == null)
            {
                throw new ArgumentNullException(MethodBase.GetCurrentMethod().Name + Utility.ConstUtili.ERR_SEPA + nameof(viewAdatas));
            }

            this.Id        = viewAdatas.Key;
            this.LastName  = viewAdatas.LastName.Value;
            this.FirstName = viewAdatas.FirstName.Value;
            this.Birthday  = viewAdatas.Birthday.Value.ToString();
            this.Gender    = viewAdatas.Gender.Value.ToString();
            this.Country   = viewAdatas.Country.Value;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// ViewAdatasに値を設定します。
        /// </summary>
        /// <param name="viewAdatas">ViewAdatasを設定します。</param>
        public void GetViewDatas(
            [param: Required] Common.ViewAdatas viewAdatas
            )
        {
            // nullチェック
            if (viewAdatas == null)
            {
                throw new ArgumentNullException(MethodBase.GetCurrentMethod().Name + Utility.ConstUtili.ERR_SEPA + nameof(viewAdatas));
            }

            viewAdatas.Key             = this.Id;
            viewAdatas.LastName.Value  = this.LastName;
            viewAdatas.FirstName.Value = this.FirstName;
            viewAdatas.Birthday.Value  = Utility.StringUtil.DateTimeParse(this.Birthday);
            viewAdatas.Gender.Value    = (Common.EnumDatas.Gender)Utility.EnumUtil.EnumParse(typeof(Common.EnumDatas.Gender), this.Gender);
            viewAdatas.Country.Value   = this.Country;
            viewAdatas.CountryDic      = this.CountryDic;
        }