[Browsable( true ) , Description( "当前页记录数" ) , Category( "分页" ) , DefaultValue( 0 )]//这一行是什么意思

本文介绍了一个 C# 分页功能中使用的属性设计方法。该属性用于表示当前页面的记录数量,并通过 VS 的属性面板展示,方便开发者进行配置。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 private   int   pageItemCount;  
  [Browsable(   true   )   ,   Description(   "当前页记录数"   )   ,   Category(   "分页"   )   ,   DefaultValue(   0   )]//这一行是什么意思  
        public   int   PageItemCount   {  
  get   {  
  return   pageItemCount;  
  }  
        }   
 

属性的设计时支持,这个属性,会出现在VS的属性面板中的“分页”一组里面

///<summary> ///成品库未发货仓储费 ///</summary> [SugarTable("WFHCPK")] public partial class WFHCPK { public WFHCPK() { } /// <summary> /// Description: /// DefaultValue: /// Nullable:False /// <summary> [Browsable(false)] [DisplayName("")] [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] public int ID { get; set; } /// <summary> /// Description:受损阿米巴 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("受损阿米巴")] public string SSAMB { get; set; } /// <summary> /// Description:责任阿米巴 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("责任阿米巴")] public string ZRAMB { get; set; } /// <summary> /// Description:生产编号 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("生产编号")] public string ProductionNumber { get; set; } /// <summary> /// Description:生产类型 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("生产类型")] public string ProductType { get; set; } /// <summary> /// Description:生产控制方 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("生产控制方")] public string ProductionControl { get; set; } /// <summary> /// Description:主要加工车间 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("主要加工车间")] public string ProductionWorkshop { get; set; } /// <summary> /// Description:成品入库日期 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("成品入库日期")] public DateTime ReceivingDate { get; set; } /// <summary> /// Description:要求发货日期 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("要求发货日期")] public DateTime DispatchDate { get; set; } /// <summary> /// Description:免费仓储天数 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("免费仓储天数")] public int? FreeDays { get; set; } /// <summary> /// Description:已存储天数 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("已存储天数")] public int? StorageDays { get; set; } /// <summary> /// Description:赔偿金额 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("赔偿金额")] public string Amount { get; set; } /// <summary> /// Description:创建人 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("创建人")] public string Creator { get; set; } /// <summary> /// Description:创建时间 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("创建时间")] public DateTime? CreateTime { get; set; } /// <summary> /// Description:更新人 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("更新人")] public string Updater { get; set; } /// <summary> /// Description:更新时间 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("更新时间")] public DateTime? UpdateTime { get; set; } /// <summary> /// Description:上次记录日期 /// DefaultValue: /// Nullable:True /// <summary> [Browsable(false)] [DisplayName("上次记录日期")] public DateTime LastTime { get; set; } 查看全部 }这是我的一个类 Amount列的格式为202507:3170 \r\n 202508:310 现在获取这个类的数据绑定到gridconrol 想要根据amount列的数据动态拆分添加数据列 202507赔偿 202508赔偿 3170 310
最新发布
07-09
车间生产有一台用电设备 他每次运行24-32小时,开机后后台每十分钟记录一次功率变化,因为一天24小时电价是波动的,现在想要根据一次运行期间记录的功率数据和一天24小时内每小时的电价数据,开发一款自动计算设备最佳开机时间的软件 其中运行时间不是固定的 需要传入参数 提供C#代码其中电价和功率存储在数据中 使用sqlsugar获取 ///<summary> ///区间电价表 ///</summary> [SugarTable("ElectricityPrices")] public partial class ElectricityPrices { public ElectricityPrices() { } /// <summary> /// Description: /// DefaultValue: /// Nullable:False /// <summary> /// [Browsable(false)] [DisplayName("")] [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] public int ID { get; set; } /// <summary> /// Description:起始时间 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("起始时间")] public DateTime StartTime { get; set; } /// <summary> /// Description:结束时间 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("结束时间")] public DateTime EndTime { get; set; } /// <summary> /// Description:价格 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("价格")] public decimal? Price { get; set; } }///<summary> ///电炉功率记录表 ///</summary> [SugarTable("PowerData")] public partial class PowerData { public PowerData() { } /// <summary> /// Description: /// DefaultValue: /// Nullable:False /// <summary> /// [Browsable(false)] [DisplayName("")] [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] public int ID { get; set; } /// <summary> /// Description:炉号 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("炉号")] public string Lh { get; set; } /// <summary> /// Description:时间 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("时间")] public DateTime Time { get; set; } /// <summary> /// Description:功率 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("功率")] public int? Power { get; set; } }
06-14
///<summary> ///区间电价表 ///</summary> [SugarTable("ElectricityPrices")] public partial class ElectricityPrices { public ElectricityPrices() { } /// <summary> /// Description: /// DefaultValue: /// Nullable:False /// <summary> /// [Browsable(false)] [DisplayName("")] [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] public int ID { get; set; } /// <summary> /// Description:起始时间 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("起始时间")] public DateTime StartTime { get; set; } /// <summary> /// Description:结束时间 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("结束时间")] public DateTime EndTime { get; set; } /// <summary> /// Description:价格 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("价格")] public decimal Price { get; set; } } ///<summary> ///电炉功率记录表 ///</summary> [SugarTable("PowerData")] public partial class PowerData { public PowerData() { } /// <summary> /// Description: /// DefaultValue: /// Nullable:False /// <summary> /// [Browsable(false)] [DisplayName("")] [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] public int ID { get; set; } /// <summary> /// Description:炉号 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("炉号")] public string Lh { get; set; } /// <summary> /// Description:时间 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("时间")] public DateTime Time { get; set; } /// <summary> /// Description:功率 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("功率")] public int? Power { get; set; } }// 获取电价数据(整个月的数据) var monthlyPriceData = SQL.Db.Queryable<ElectricityPrices>().ToList(); // 获取功率数据 var powerDataByType = new Dictionary<OnlyElectricity.DeviceType, List<PowerData>> { [OnlyElectricity.DeviceType.A] = SQL.Db.Queryable<PowerData>() .Where(p => p.Lh == "1-25").ToList(), [OnlyElectricity.DeviceType.B] = SQL.Db.Queryable<PowerData>() .Where(p => p.Lh == "27-28").ToList(), [OnlyElectricity.DeviceType.C] = SQL.Db.Queryable<PowerData>() .Where(p => p.Lh == "29-32").ToList() };电价和功率使用这些
06-26
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值