J
Jiøí Neu¾il
Hi, I created two datasets in dataset designer in VS 2005. Both of them
contain the same datatable. I think, having two classes for one DB datatable
is stupid and badly maintaining. So I need manually add DataTable class from
first dataset to second. So I modified designer.cs of second dataset and I
added datatable from first dataset:
I added this code to InitClass() method of second Dataset:
this.UCET = new ageu.DataLayer.dsFakturace.UCETDataTable();
base.Tables.Add(this.UCET);
Ucet is DB table, which I need in both datasets. dsFakturace is first
dataset. This is working solution, design -time databinding is working. But,
designer sometimes regenerate designer.cs and my changes are lost. Is there
any better approach to do this?
Thank you.
contain the same datatable. I think, having two classes for one DB datatable
is stupid and badly maintaining. So I need manually add DataTable class from
first dataset to second. So I modified designer.cs of second dataset and I
added datatable from first dataset:
I added this code to InitClass() method of second Dataset:
this.UCET = new ageu.DataLayer.dsFakturace.UCETDataTable();
base.Tables.Add(this.UCET);
Ucet is DB table, which I need in both datasets. dsFakturace is first
dataset. This is working solution, design -time databinding is working. But,
designer sometimes regenerate designer.cs and my changes are lost. Is there
any better approach to do this?
Thank you.