Exemplo n.º 1
0
 /// <summary>
 /// 设置_模型_数据
 /// </summary>
 /// <param name="info">行信息</param>
 /// <param name="target_model">目标模型</param>
 /// <param name="ov">数据</param>
 /// <returns>目标模型</returns>
 public AbsShineUpon SetValue_Object(ShineUponInfo info, AbsShineUpon target_model, object ov)
 {
     if (!CheckData.IsObjectNull(ov) && info.Property.CanWrite)
     {
         Type   itype = info.Property.PropertyType;
         object oo    = ConvertTool.ToObject(itype, ov);
         info.Property.SetValue(target_model, oo, null);
     }
     return(target_model);
 }
Exemplo n.º 2
0
        /// <summary>
        /// 获取_模型_数据
        /// </summary>
        /// <param name="info">行信息</param>
        /// <param name="model">数据来源</param>
        /// <returns>键值数据</returns>
        public KeyObject GetValue_KeyObject(ShineUponInfo info, AbsShineUpon model)
        {
            if (CheckData.IsObjectNull(info) || CheckData.IsObjectNull(model))
            {
                return(null);
            }
            object ov = info.Property.GetValue(model, null);

            return(new KeyObject(info.Property.Name, ov));
        }
Exemplo n.º 3
0
        /// <summary>
        /// 获取_模型_数据
        /// </summary>
        /// <param name="info">行信息</param>
        /// <param name="model">数据来源</param>
        /// <returns>键值数据</returns>
        public KeyString GetValue_KeyString(ShineUponInfo info, AbsShineUpon model)
        {
            KeyObject ko = GetValue_KeyObject(info, model);

            if (CheckData.IsObjectNull(ko))
            {
                return(null);
            }
            string sv = ConvertTool.ToString(ko.Value);

            return(new KeyString(ko.Key, sv));
        }