小编Ali*_*adi的帖子

从root tsql获取特定节点路径

我希望在树结构的表中设置数据.

DECLARE @temp TABLE 
(
      Id INT
    , Name VARCHAR(50)
    , Parent INT
)

INSERT @temp 
SELECT 1,' Great GrandFather Thomas Bishop', null UNION ALL
SELECT 2,'Grand Mom Elian Thomas Wilson' , 1 UNION ALL
SELECT 3, 'Dad James Wilson',2 UNION ALL
SELECT 4, 'Uncle Michael Wilson', 2 UNION ALL
SELECT 5, 'Aunt Nancy Manor', 2 UNION ALL
SELECT 6, 'Grand Uncle Michael Bishop', 1 UNION ALL
SELECT 7, 'Brother David James Wilson',3 UNION ALL
SELECT 8, 'Sister Michelle Clark', …
Run Code Online (Sandbox Code Playgroud)

t-sql sql-server tree common-table-expression

5
推荐指数
1
解决办法
438
查看次数

转换Hijri Shamsi日期格式tsql

我希望将我的Hijri Shamsi日期'92/2/3'改为这种格式:'92/02/03'

使用此代码,我收到此错误:将varchar数据类型转换为datetime数据类型会导致超出范围的值.

Declare @Str Varchar(10) = '92/2/3'
Select Convert(Varchar(10), Convert(DateTime, @Str), 111)
Run Code Online (Sandbox Code Playgroud)

我该如何更改日期格式?

t-sql date hijri

5
推荐指数
1
解决办法
1490
查看次数

如何在propertygrid c#中的属性中设置BrowseAttribute true或false?

可能重复:
有条件的"可浏览"属性

我定义AppSettings了具有一些属性的类.在我的形式,当我click Button1,我想要显示属性1和2(1,2显示,其他属性隐藏或不显示),何时click Button2,我想显示属性2和3(1是隐藏,2,3显示,其他属性是隐藏或不显示),我该怎么办?

public class AppSettings
{
    [BrowsableAttribute(true), CategoryAttribute("Document Settings"), DefaultValueAttribute(true)]
    public bool SaveOnClose{ get; set; }

    [BrowsableAttribute(true), CategoryAttribute("Global Settings"), ReadOnlyAttribute(true), DefaultValueAttribute("Welcome to AppDev!")]
    public string GreetingText { get; set; }

    [BrowsableAttribute(true), DescriptionAttribute("The rate in milliseconds that the text will repeat."), CategoryAttribute("Global Settings"), DefaultValueAttribute(10)]
    public int MaxRepeatRate { get; set; }

    [BrowsableAttribute(true), CategoryAttribute("Global Settings"), DefaultValueAttribute(4)]
    public int ItemsInMRUList { get; set; }

    [BrowsableAttribute(true), DefaultValueAttribute(false)]
    public bool SettingsChanged { get; set; }

    [BrowsableAttribute(true), …
Run Code Online (Sandbox Code Playgroud)

c# propertygrid

3
推荐指数
1
解决办法
2997
查看次数

如何获取PropertyGrid的单元格值(c#)?

如何在c#中获取属性网格项和项的值?例如 :

Name : Ali
LastName : Ahmadi
Run Code Online (Sandbox Code Playgroud)

(Name和LastName是propertygrid的2个属性)

c# propertygrid

3
推荐指数
1
解决办法
3650
查看次数

如何在c#中将defaulty的默认值设置为propertyygrid的大小类型属性?

我有一个属性网格,myclass是它的对象源.在我的班级中,我从大小类型中定义了一个项目.如何在item属性中设置默认值?

请看我的代码:

[CategoryAttribute("Information"), DefaultValue(Size(0, 0))]
public Size AndaazehPixel { get; set; }
Run Code Online (Sandbox Code Playgroud)

我的错误:'System.Drawing.Size'是'type'但是像'变量'一样使用

c# propertygrid

3
推荐指数
1
解决办法
1447
查看次数

sql server表中的最大nvarchar(max)列数

SQL Server 2008 R2中定义Nvarchar(max)列的限制是什么?

我看到了这个链接

但是,我希望在一个表中获得nvarchar(max)列的限制数量.

sql-server nvarchar

3
推荐指数
1
解决办法
2538
查看次数