UPDATE: This was added long after (several years!!): I’m using this post to test some code snippet plug-ins. This post can certainly be ignored!
public void SetParmDirection(string ParmName, ParameterDirection direction)
{
if (ParmName.StartsWith("@") == false)
ParmName = "@" + ParmName;
if (this.oCommand.Parameters.IndexOf(ParmName) > -1)
this.oCommand.Parameters[ParmName].Direction = direction;
}
{
if (ParmName.StartsWith("@") == false)
ParmName = "@" + ParmName;
if (this.oCommand.Parameters.IndexOf(ParmName) > -1)
this.oCommand.Parameters[ParmName].Direction = direction;
}
public void SetParmDirection(string ParmName, ParameterDirection direction) { if (ParmName.StartsWith("@") == false) ParmName = "@" + ParmName; if (this.oCommand.Parameters.IndexOf(ParmName) > -1) this.oCommand.Parameters[ParmName].Direction = direction; }And now I’m going to test a combination of the two. This is tricky in that I have to steal the div tags from the first plug-in and wrap them around the html from the second plug-in … making sure to change the ids as well. Let’s see if this works well or not:
// ds20 is a 2.0 Typed DataSet, which uses plain a plain old DataTable DataTable dt20 = ds20.Personnel.DefaultView.ToTable(true); DataTable dtLinq = ds20.Personnel.AsEnumerable() .Select(row => row).Distinct(DataRowComparer.Default) .CopyToDataTable(); // Note that if you MUST use the DataRowComparer. // If you don't you get all rows returned ... it won't find the duplicates.
// ds35 is the 3.5 Typed DataSet // note that the only difference in syntax is that you don't need .AsEnumerable() DataTable dt35 = ds35.Personnel.Select(row => row).Distinct(DataRowComparer.Default).CopyToDataTable();
UPDATE: Darn, a new version of Live Writer, now I need all new code snippet plug-ins!
// ds20 is a 2.0 Typed DataSet, which uses plain a plain old DataTable DataTable dt20 = ds20.Personnel.DefaultView.ToTable(true); DataTable dtLinq = ds20.Personnel.AsEnumerable() .Select(row => row).Distinct(DataRowComparer.Default) .CopyToDataTable(); // Note that if you MUST use the DataRowComparer. // If you don't you get all rows returned ... it won't find the duplicates.
UPDATE: Just checking that WLW (Live Writer) isn’t broken anymore.
Testing comment format.
ReplyDeleteTesting comments again.
ReplyDeletethanks!
ReplyDelete