Beispiel #1
0
 public void Update()
 {
     if (String.IsNullOrEmpty(DicSingleValueCtrl.SelectedValue) && MetaField.AllowNulls)
     {
         MetaHelper.SetMetaFieldValue(MetaField.Context, MetaObject, MetaField.Name, new object[] { null });
     }
     else
     {
         MetaHelper.SetMetaFieldValue(MetaField.Context, MetaObject, MetaField.Name, new object[] { DicSingleValueCtrl.SelectedValue });
     }
 }
Beispiel #2
0
 /// <summary>
 /// Updates this instance.
 /// </summary>
 public void Update()
 {
     if (String.IsNullOrEmpty(MetaValueCtrl.Text) && MetaField.AllowNulls)
     {
         MetaHelper.SetMetaFieldValue(MetaField.Context, MetaObject, MetaField.Name, new object[] { null });
     }
     else
     {
         MetaHelper.SetMetaFieldValue(MetaField.Context, MetaObject, MetaField.Name, new object[] { Double.Parse(MetaValueCtrl.Text) });
     }
 }
Beispiel #3
0
        /// <summary>
        /// Updates this instance.
        /// </summary>
        public void Update()
        {
            if (DictionaryItemsTable != null)
            {
                MetaStringDictionary dict = new MetaStringDictionary();
                foreach (DataRow row in DictionaryItemsTable.Rows)
                {
                    dict.Add((string)row["Key"], (string)row["Value"]);
                }

                MetaHelper.SetMetaFieldValue(MetaField.Context, MetaObject, MetaField.Name, new object[] { dict });
            }
            else
            {
                MetaHelper.SetMetaFieldValue(MetaField.Context, MetaObject, MetaField.Name, new object[] { null });
            }
        }
Beispiel #4
0
        public void Update()
        {
            // Add new values if any
            if (DictionaryItemsTable != null)
            {
                foreach (DataRow row in DictionaryItemsTable.Rows)
                {
                    if ((int)row["Id"] == -1)
                    {
                        int id = MetaField.Dictionary.Add((string)row["Value"]);
                        row["Id"] = id;
                        foreach (ListItem item in MetaMultiValueCtrl.Items)
                        {
                            if (Int32.Parse(item.Value) == -1 && String.Compare((string)row["Value"], item.Text) == 0)
                            {
                                item.Value = id.ToString();
                            }
                        }
                    }
                }
            }

            //// Add new values if any
            //foreach(ListItem item in MetaMultiValueCtrl.Items)
            //{
            //    if(item.Value.Length == 0)
            //        MetaField.DictionaryAdd(item.Text);
            //}

            // Save selected values
            ArrayList selected = new ArrayList();

            foreach (ListItem item in MetaMultiValueCtrl.Items)
            {
                if (item.Selected)
                {
                    selected.Add(item.Value);
                }
            }

            MetaHelper.SetMetaFieldValue(MetaField.Context, MetaObject, MetaField.Name, (string[])selected.ToArray(typeof(string)));

            //MetaField.Value = (string[])selected.ToArray(typeof(string));
        }
Beispiel #5
0
 /// <summary>
 /// Updates this instance.
 /// </summary>
 public void Update()
 {
     MetaHelper.SetMetaFieldValue(MetaField.Context, MetaObject, MetaField.Name, new object[] { MetaValueCtrl.Text });
 }
 /// <summary>
 /// Updates this instance.
 /// </summary>
 public void Update()
 {
     MetaHelper.SetMetaFieldValue(MetaField.Context, MetaObject, MetaField.Name, new object[] { Int32.Parse(MetaValueCtrl.SelectedValue) });
 }
 /// <summary>
 /// Updates this instance.
 /// </summary>
 public void Update()
 {
     MetaHelper.SetMetaFieldValue(MetaField.Context, MetaObject, MetaField.Name, new object[] { DTClientControl1.Value.ToUniversalTime() });
 }