84 lines
3.6 KiB
C#
84 lines
3.6 KiB
C#
|
|
using System.Collections.Generic;
|
|||
|
|
using Sozsoft.Platform.Enums;
|
|||
|
|
using Volo.Abp.Domain.Values;
|
|||
|
|
|
|||
|
|
namespace Sozsoft.Platform.Queries;
|
|||
|
|
|
|||
|
|
public class CommandColumn : ValueObject
|
|||
|
|
{
|
|||
|
|
/// <summary> Gridde kullanılacak fonksiyon butonlarının konumunu belirler
|
|||
|
|
/// </summary>
|
|||
|
|
public UiCommandButtonPositionTypeEnum ButtonPosition { get; set; } = UiCommandButtonPositionTypeEnum.CommandColumn;
|
|||
|
|
/// <summary> Burada yazan yetki ismi kullanicilarin yetkisinde varsa ilgili fonksiyon/buton gorunur olur.
|
|||
|
|
/// Boş bırakılmış ise yetkisi var sayılır
|
|||
|
|
/// CommandColumn icerisindeki buton icin yeni bir yetki tanimi yapilir, tanimi yapilan yetkinin ismi buraya yazilir
|
|||
|
|
/// </summary>
|
|||
|
|
public string AuthName { get; set; }
|
|||
|
|
/// <summary> Eklenecek butonun görünen ismi
|
|||
|
|
/// </summary>
|
|||
|
|
public string Text { get; set; }
|
|||
|
|
/// <summary> Fare ile bağlantı yada icon üzerine gelince çıkacak yazı
|
|||
|
|
/// </summary>
|
|||
|
|
public string Hint { get; set; }
|
|||
|
|
/// <summary>
|
|||
|
|
/// Alabilecegi degerler:
|
|||
|
|
/// Url
|
|||
|
|
/// The icon's name if the icon is from the DevExtreme icon library: https://js.devexpress.com/Documentation/Guide/Themes_and_Styles/Icons/#Built-In_Icon_Library
|
|||
|
|
/// The icon's CSS class if the icon is from an external icon library (see External Icon Libraries)
|
|||
|
|
/// The icon in the Base64 format
|
|||
|
|
/// The icon in the SVG format. Ensure that the source is reliable.
|
|||
|
|
///
|
|||
|
|
/// https://js.devexpress.com/Documentation/ApiReference/UI_Components/dxContextMenu/Configuration/items/#icon
|
|||
|
|
/// </summary>
|
|||
|
|
public string Icon { get; set; }
|
|||
|
|
/// <summary> Tiklandiginda calistirilacak baglanti
|
|||
|
|
/// url icerisine süslü parantez ile {alanismi} girid icerisindeki kolonlarin FieldName bilgileri yazilabilir.
|
|||
|
|
/// Bu sekilde ilgili baglanti dinamik olarak olusturulabilir
|
|||
|
|
/// Ek olarak yazilabilecek parametreler:
|
|||
|
|
/// {ListFormCode}
|
|||
|
|
/// </summary>
|
|||
|
|
public string Url { get; set; }
|
|||
|
|
/// <summary>
|
|||
|
|
/// Alabilecegi Degerler: _blank
|
|||
|
|
/// _parent
|
|||
|
|
/// _self
|
|||
|
|
/// _top
|
|||
|
|
/// </summary>
|
|||
|
|
public string UrlTarget { get; set; }
|
|||
|
|
/// <summary> UI tarafında çağrılacak dialog component adı
|
|||
|
|
/// </summary>
|
|||
|
|
public string DialogName { get; set; }
|
|||
|
|
/// <summary> UI tarafında çağrılacak dialog component parametrelerier
|
|||
|
|
/// </summary>
|
|||
|
|
public string DialogParameters { get; set; }
|
|||
|
|
/// <summary> Url boş ise calisacak 'eval' icerisinde calisacak olan kod
|
|||
|
|
/// </summary>
|
|||
|
|
public string OnClick { get; set; }
|
|||
|
|
/// <summary> Görünür durumu
|
|||
|
|
/// </summary>
|
|||
|
|
public bool IsVisible { get; set; } = true;
|
|||
|
|
/// <summary> Dinamik görünürlük kontrolü için JavaScript fonksiyonu
|
|||
|
|
/// Örnek: "(e) => !e.row.isEditing" veya "(e) => e.row.data.Status === 'Active'"
|
|||
|
|
/// Fonksiyon parametre olarak DevExtreme button event objesini alır (e.row, e.row.data, e.row.isEditing vb.)
|
|||
|
|
/// true/false döndürmelidir
|
|||
|
|
/// </summary>
|
|||
|
|
public string VisibleExpression { get; set; }
|
|||
|
|
|
|||
|
|
protected override IEnumerable<object> GetAtomicValues()
|
|||
|
|
{
|
|||
|
|
yield return ButtonPosition;
|
|||
|
|
yield return AuthName;
|
|||
|
|
yield return Text;
|
|||
|
|
yield return Hint;
|
|||
|
|
yield return Icon;
|
|||
|
|
yield return Url;
|
|||
|
|
yield return UrlTarget;
|
|||
|
|
yield return DialogName;
|
|||
|
|
yield return DialogParameters;
|
|||
|
|
yield return OnClick;
|
|||
|
|
yield return IsVisible;
|
|||
|
|
yield return VisibleExpression;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|