Exemplo n.º 1
0
 public void Set(DTObjects values)
 {
     using (var temp = StringPool.Borrow())
     {
         var code = temp.Item;
         code.AppendFormat("{0}.proxy().set({1});", this.Id, values.GetCode(false));
         this.View.WriteCode(code.ToString());
     }
 }
Exemplo n.º 2
0
        //private DateTime _value = DateTime.MinValue;

        //public DateTime Value
        //{
        //    get
        //    {
        //        if (_value == DateTime.MinValue)
        //            _value = this.Metadata.GetValue<DateTime>("value", DateTime.MinValue);
        //        return _value;
        //    }
        //}


        #region 发射命令

        /// <summary>
        /// 设置值
        /// </summary>
        public void SetConfig(DTObjects config)
        {
            this.View.WriteCode(string.Format("{0}.proxy().setConfig({1});", this.Id, config.GetCode(false)));
        }
Exemplo n.º 3
0
 /// <summary>
 /// 刷新列表
 /// </summary>
 /// <param name="deletedItems">指示哪些项被删除,如果没有删除项,那么传null</param>
 public void Reload(DTObjects deletedValues = null)
 {
     if (deletedValues == null)
     {
         this.View.WriteCode(string.Format("{0}.proxy().reload();", this.Id));
     }
     else //传递项被删除,主要是为了dataTable组件记录的selectValues也可以同步删除,否则会可能浏览器内存占用过大
     {
         this.View.WriteCode(string.Format("{0}.proxy().reload({1});", this.Id, deletedValues.GetCode(false)));
     }
 }
Exemplo n.º 4
0
 public void SetValue(DTObjects value)
 {
     this.View.WriteCode(string.Format("{0}.proxy().set({1});", this.Id, value.GetCode(false)));
 }
Exemplo n.º 5
0
        /// <summary>
        /// 设置值
        /// </summary>
        public void SetValue(DTObject[] value)
        {
            DTObjects list = new DTObjects(value);

            this.View.WriteCode(string.Format("{0}.proxy().set({1});", this.Id, list.GetCode(false)));
        }
Exemplo n.º 6
0
 public void SetData(DTObjects data)
 {
     this.View.WriteCode(string.Format("{0}.proxy().setData({1});", this.Id, data.GetCode(false)));
 }
Exemplo n.º 7
0
        /// <summary>
        /// 对列表进行赋值操作
        /// </summary>
        /// <param name="value"></param>
        public void SetData(DTObject[] data)
        {
            DTObjects list = new DTObjects(data);

            this.View.WriteCode(string.Format("{0}.proxy().setData({1});", this.Id, list.GetCode(false)));
        }