Beispiel #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();
            }
        }
Beispiel #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();
            }
        }
Beispiel #3
0
 public static string GetElementForCreate(this Field field, string pk, string value, string guid)
 {
     return(FieldExtentions.GetElementForCreate(field, pk, value, guid));
 }