Пример #1
0
        public static string GetElementForRowView(this Field field, DataAction dataAction, object data, string guid)
        {
            switch (dataAction)
            {
            case DataAction.Create:
                string pk = string.Empty;
                if (data != null && data is string)
                {
                    pk = (string)data;
                }
                return(FieldExtentions.GetElementForCreate(field, pk, string.Empty, guid));

            case DataAction.Edit:
                if (data != null && data is DataRow)
                {
                    DataRow dataRow = (DataRow)data;

                    return(FieldExtentions.GetElementForEdit(field, dataRow, guid));
                }
                else
                {
                    return(FieldExtentions.GetElementForEdit(field, string.Empty, string.Empty, guid));
                }

            case DataAction.InlineAdding:
                return(FieldExtentions.GetElementForInlineAdding(field, guid));

            default:
                throw new NotSupportedException();
            }
        }
Пример #2
0
        public static string GetElementForRowView(this Field field, DataAction dataAction, string pk, string value, string guid)
        {
            switch (dataAction)
            {
            case DataAction.Create:
                return(FieldExtentions.GetElementForCreate(field, pk, value, guid));

            case DataAction.Edit:
                return(FieldExtentions.GetElementForEdit(field, pk, value, guid));

            case DataAction.InlineAdding:
                return(FieldExtentions.GetElementForInlineAdding(field, guid));

            default:
                throw new NotSupportedException();
            }
        }
Пример #3
0
        public static bool IsVisibleForRow(this Field field, DataAction dataAction)
        {
            switch (dataAction)
            {
            case DataAction.Create:
                return(FieldExtentions.IsVisibleForCreate(field));

            case DataAction.Report:
                return(FieldExtentions.IsVisibleForReport(field));

            case DataAction.Edit:
                return(FieldExtentions.IsVisibleForEdit(field));

            case DataAction.InlineAdding:
                return(FieldExtentions.IsVisibleForCreate(field));

            case DataAction.InlineEditing:
                return(FieldExtentions.IsVisibleForEdit(field));

            default:
                throw new NotSupportedException();
            }
        }
Пример #4
0
 public static string GetElementForFilter(this Field field, object value, string guid)
 {
     return(FieldExtentions.GetElementForFilter(field, value, guid));
 }
Пример #5
0
 public static string GetElementForEdit(this Field field, string pk, string value, string guid)
 {
     return(FieldExtentions.GetElementForEdit(field, pk, value, guid));
 }
Пример #6
0
 public static string GetElementForEdit(this Field field, DataRow dataRow, string guid)
 {
     return(FieldExtentions.GetElementForEdit(field, dataRow, guid));
 }
Пример #7
0
 public static string GetElementForCreate(this Field field, string guid)
 {
     return(FieldExtentions.GetElementForCreate(field, guid));
 }
Пример #8
0
 public static bool IsVisibleForTable(this Field field)
 {
     return(FieldExtentions.IsVisibleForTable(field));
 }
Пример #9
0
        // Public Methods (30) 

        public static string GetDataActionPrefix(this Field field, DataAction dataAction)
        {
            return(FieldExtentions.GetDataActionPrefix(field, dataAction));
        }
Пример #10
0
 public static bool IsHidden(this Field field)
 {
     return(FieldExtentions.GetHtmlControlType(field) == HtmlControlType.Hidden);
 }
Пример #11
0
 public static bool IsDisableForEdit(this Field field, string guid)
 {
     return(FieldExtentions.IsDisableForEdit(field, guid));
 }
Пример #12
0
 public static bool IsDisableForCreate(this Field field)
 {
     return(FieldExtentions.IsDisableForCreate(field));
 }
Пример #13
0
 public static string GetValidationType(this Field field)
 {
     return(FieldExtentions.GetValidationType(field));
 }
Пример #14
0
 public static string GetValidationElements(this Field field, DataAction dataAction, string guid)
 {
     return(FieldExtentions.GetValidationElements(field, dataAction, guid));
 }
Пример #15
0
 public static HtmlControlType GetElementForTableView(this Field field, string guid)
 {
     return(FieldExtentions.GetHtmlControlType(field));
 }
Пример #16
0
 public override bool IsAllow(DataAction dataAction)
 {
     return(!FieldExtentions.IsDisable(this, dataAction, null));
 }