J
Joe
Hi
I have a typed dataset and I want to add a method to modify a value in the
datarow.
I want to inherit from the class so if the XSDchanges I would lose my code
when the class regenerates
This is what I am trying with no luck is below. I cannot see JobID in
intellisense after I inherit.
I assume due to it being private
What is the best what to add this method to modify a value in a row?
Thanks
public class JobClass : Schedule
{
public void GenerateNewID()
{
JobID = System.DateTime.Now.Ticks.ToString();
}
}
Genarated Class from XSD
public partial class Schedule : System.Data.DataSet {
private JobsDataTable tableJobs;
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator",
"2.0.0.0")]
public partial class JobsRow : System.Data.DataRow {
private JobsDataTable tableJobs;
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
internal JobsRow(System.Data.DataRowBuilder rb) :
base(rb) {
this.tableJobs = ((JobsDataTable)(this.Table));
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public string JobID {
get {
try {
return ((string)(this[this.tableJobs.JobIDColumn]));
}
catch (System.InvalidCastException e) {
throw new System.Data.StrongTypingException("The value for column \'JobID\'
in table \'Jobs\' is DBNull.", e);
}
}
set {
this[this.tableJobs.JobIDColumn] = value;
}
}
}
}
I have a typed dataset and I want to add a method to modify a value in the
datarow.
I want to inherit from the class so if the XSDchanges I would lose my code
when the class regenerates
This is what I am trying with no luck is below. I cannot see JobID in
intellisense after I inherit.
I assume due to it being private
What is the best what to add this method to modify a value in a row?
Thanks
public class JobClass : Schedule
{
public void GenerateNewID()
{
JobID = System.DateTime.Now.Ticks.ToString();
}
}
Genarated Class from XSD
public partial class Schedule : System.Data.DataSet {
private JobsDataTable tableJobs;
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator",
"2.0.0.0")]
public partial class JobsRow : System.Data.DataRow {
private JobsDataTable tableJobs;
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
internal JobsRow(System.Data.DataRowBuilder rb) :
base(rb) {
this.tableJobs = ((JobsDataTable)(this.Table));
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public string JobID {
get {
try {
return ((string)(this[this.tableJobs.JobIDColumn]));
}
catch (System.InvalidCastException e) {
throw new System.Data.StrongTypingException("The value for column \'JobID\'
in table \'Jobs\' is DBNull.", e);
}
}
set {
this[this.tableJobs.JobIDColumn] = value;
}
}
}
}