Example #1
0
        public static string DisplayValue(this Tk5FieldInfoEx field, IFieldValueProvider row)
        {
            object fieldValue = row[field.NickName];

            return(DisplayUtil.GetDisplayString(field.ListDetail.ListDisplay, fieldValue, field, row));
            //return DisplayValue(field, row, false);
        }
Example #2
0
        public static string Detail(this Tk5FieldInfoEx field, IFieldValueProvider row, bool showHint, bool needId)
        {
            TkDebug.AssertArgumentNull(field, "field", null);

            HtmlAttributeBuilder builder = new HtmlAttributeBuilder();

            AddNormalAttribute(field, builder, field.NickName, needId, true);
            object fieldValue = row[field.NickName];

            builder.Add("data-value", fieldValue.ToString());
            HtmlAttribute classAttr = builder["class"];

            if (classAttr == null)
            {
                builder.Add("class", "detail-content");
            }
            else
            {
                classAttr.Value = HtmlCommonUtil.MergeClass(classAttr.Value, "detail-content");
            }
            string displayValue = DisplayUtil.GetDisplayString(field.ListDetail.DetailDisplay,
                                                               fieldValue, field, row);

            return(string.Format(ObjectUtil.SysCulture, "<div {0}>{1}</div>",
                                 builder.CreateAttribute(), displayValue));
        }
Example #3
0
        internal static string DateTimeEnd(Tk5FieldInfoEx field, IFieldValueProvider row)
        {
            string name       = GetSearchEndName(field);
            object fieldValue = row[name + "END"];
            string value      = DisplayUtil.GetDisplayString(field.Edit.Display, fieldValue, field, row);

            return(DateControl(field, "th", name, value, "yyyy-mm-dd hh:ii", 16, true, true));
        }
Example #4
0
        internal static string InputEnd(Tk5FieldInfoEx field, IFieldValueProvider row)
        {
            TkDebug.AssertArgumentNull(field, "field", null);
            string name       = GetSearchEndName(field);
            object fieldValue = row[name]; // DisplayUtil.GetValue(name, row);
            string value      = DisplayUtil.GetDisplayString(field.Edit.Display, fieldValue, field, row);

            return(InternalInput(field, name, value, true, true));
        }
Example #5
0
        private static string Input(this Tk5FieldInfoEx field, IFieldValueProvider row,
                                    bool needId, bool isSearchCtrl)
        {
            TkDebug.AssertArgumentNull(field, "field", null);
            object fieldValue = row[field.NickName]; // DisplayUtil.GetValue(field.NickName, row);
            string value      = DisplayUtil.GetDisplayString(field.Edit.Display, fieldValue, field, row);

            return(InternalInput(field, field.NickName, value, needId, isSearchCtrl));
        }
Example #6
0
        private static string DateTime(this Tk5FieldInfoEx field, IFieldValueProvider row,
                                       bool needId, bool isSearchCtrl)
        {
            TkDebug.AssertArgumentNull(field, "field", null);

            object fieldValue = row[field.NickName];
            string value      = DisplayUtil.GetDisplayString(field.Edit.Display, fieldValue, field, row);

            return(DateControl(field, "th", field.NickName, value, "yyyy-mm-dd hh:ii", 16, needId, isSearchCtrl));
        }