comando.CommandText = "INSERT INTO TbPaineis (Codigo,CodigoVista,Indicador,DockPosition,Altura,Largura) VALUES(@Codigo,@CodigoVista,@Indicador,@DockPosition,@Altura,@Largura)"
If sqlConn.State <> ConnectionState.Open Then
sqlConn.Open()
End If
comando.ExecuteNonQuery()
i += 1
Next
load panels:
For Each d As Object In DockingManager1.DockingSites(0).ManagedDockables
DockingManager1.DockingSites(0).Remove(d)
Next
For Each dr As DataRow In dsVistas.Tables(0).Rows
Dim dock As New DockPanel
dock.Tag = dr("Codigo")
dock.Text = dr("Indicador")
DockingManager1.SuspendLayout()
dock.Size = New Size(dr("Largura"), dr("Altura"))
DockingManager1.ResumeLayout()
DockingManager1.SetDock(dock, dr("DockPosition"))
Next
I tried this code but the structure loaded is different from the saved one.
What is missing?
Thanks in advance.
Hi ,
The following code throws Invalid Type Cast Exception because, I am not able to convert Decimal data into Date time data.
Please send me any possible way to do this at the earliest.
DateTime et = new DateTime();
DateTime st = new DateTime();
st = Convert.ToDateTime(nstarthrs.Value);
et = Convert.ToDateTime(nendhrs.Value);
Where nstarthrs is a numeric and nendhrs are Updown Conrol holds Decimal values.
By
RSugumar