Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - rescobar

Pages: 1 ... 3 4 [5]
General Board / ADO.NET Dataset reversed
« on: February 06, 2003, 10:42:16 am »
I don't know if this is a bug.
When you reverse a Dataset created in a Web Service Visual.NET project, the first datatable in the dataset is not reversed properly. All the following tables are created ok (EventsArgs -- DataRow - DataTable).
Any experience about it?

General Board / Re: .NET Framework instantiated objects
« on: February 21, 2003, 05:25:15 am »
Hi Steven!
I don't undestand how you make a "class declaration" or a "variable declaration". As I understand, a class should instantiated not declared as a variable.
.NET documentation establish: "The Protected keyword confers protected access on one or more declared programming elements. Protected elements are accessible only from within their own class or from a derived class. Protected access is not a superset of friend access", so it seems that Protected regards classes, not variables.
Please explain me these concepts.

General Board / .NET Framework instantiated objects
« on: February 18, 2003, 12:09:01 pm »
Please somebody could explain me why the following statement

Protected WithEvents dgGradosRiesgo As System.Web.UI.WebControls.DataGrid

in a ASP.NET form produces an attribute in the resulting class reversed by EA instead of a separate class associated with the form??

Thanks for your kind help

General Board / synchronization
« on: February 16, 2003, 03:05:14 pm »
Hi all!

I'm working with a webservice project. EA syncrhronization does not work well. I think there is a bug (maybe particulary with because there is no way that the sync option re-parse new code.
Or maybe I'm doing something wrong? Please let me know if somebody experimented same results.

General Board / Re: How do I update a Data Model?
« on: February 14, 2003, 11:16:13 am »
Good question. When you add for example a join between two tables that were not in the original reversion, there is no way to synchronize the model.
Moderator: please let us know how to avoid this problem.
Thanks a lot

Uml Process / Re: UML and .NET Framework / vb.NET
« on: February 18, 2003, 10:50:32 am »
Thank you, Robert. I'm importing classes to my EA model from the VB.NET project. In general, I'm not sure about framework classes inheritance in my classes, sequence diagrams, etc. For example, I instanciate a DataAdapter in the webservice in order to get the data using da.Fill method, but I don´t find in any class reversed these method. Obviously, I'm new in using UML in VB. I will wait for a good book in this matter. I read (a year ago) Doing Objects in VB (Deborah Kurata). Interesting book but I think it is oriented in VB6. As VB.NET has a different structure, I can't find a proper way to use UML.
Thanks again and if you get some book, article or whatever documentation please let me know (sorry, my english is not so good as i wish).

Uml Process / UML and .NET Framework / vb.NET
« on: February 18, 2003, 04:31:33 am »
Do somebody know a good source (books, articles) to learn vb.NET design and modeling via UML?
I´d like to learn in a practical way applying UML modeling and desing to study cases.
Thanks a lot for your kind help

Uml Process / Re: sequence diagrams
« on: April 17, 2003, 11:15:15 am »
Anyway if you are a "purist" you should include all abjects in the sequence diagramam.

How do you think about a VS.NET IDE software design and
modeling all objects in .NET?
Where do you think is the "mid-point" between a good modeling practices and rapid development?
What do you think is the "correct" methodology?

I do the following:

Use Cases
Analysis Diagramas for Use Cases
DataBase modeling (using SQLServer 2000 diagrams)
Reverse database into Model
Programming using IDE
Reverse programs into Model
Refine code and model in a iterative manner.
Every relevant Use case should have at least: Analysis Diagram,
Sequence Diagram and Class Diagram
What do you think?
Thanks in advance

Uml Process / sequence diagrams
« on: April 01, 2003, 07:48:57 am »
Please somebody could tell me how to construct a "good" sequence diagram from real code?.
For example, in the following code (part of a form class code), how could I represent all the messages?
This is a form with a TabControl. It inlcudes a grid. Also references to a webservice (persistence service).
I'm very confused with the sequence diagrams. The class diagrams are easy and clear and there is no problem with them.
Maybe my approach is wrong?
Thanks to all

Imports System.Text

Public Class frmClientes
 Inherits System.Windows.Forms.Form

 Private pLim As clsLimpiarPantallas
 Private mdsCliente As cpd02.dsClientes01
 Protected WithEvents ds As New cpd02.dsClientes01() 'para todos los datos
 Private ws As New cpd02.ClientesWS()
 Private WithEvents dgRUC As New clsGridRUC()  'tablas que serán leidas de la base de datos
 Private dsI As New cpd02.dsClientes01() 'para la grid

 Private mModoClientes As Integer
 Private mModoRUC As Integer
 Private mCodTipoDocCI As Integer
 Private tbTipoDoc As String = "TipoDoc"
 Private tbLugarEmision As String = "LugarEmision"
 Private tbTiposPersona As String = "TiposPersona"
 Private tbEstadoCivil As String = "EstadoCivil"
 Private tbCaedec As String = "Caedec"
 Private tbProfesiones As String = "Profesiones"
 Private tbSexo As String = "Sexo"
 Private tbTiposVivienda As String = "TiposVivienda"
 Private tbClientes As String = "Clientes"
 Private tbRucCliente As String = "RUCCliente"

Private Sub frmClientes_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
   ds.Merge(ws.GetDatos(String.Empty, tbTipoDoc))
   ds.Merge(ws.GetDatos(String.Empty, tbLugarEmision))
   ds.Merge(ws.GetDatos(String.Empty, tbTiposPersona))
   ds.Merge(ws.GetDatos(String.Empty, tbEstadoCivil))
   ds.Merge(ws.GetDatos(String.Empty, tbCaedec))
   ds.Merge(ws.GetDatos(String.Empty, tbProfesiones))
   ds.Merge(ws.GetDatos(String.Empty, tbSexo))
   ds.Merge(ws.GetDatos(String.Empty, tbTiposVivienda))

   'traemos el parámetro de codigo de Carnet de Identidad en la Tabla TipoDoc
   'La clave de este parámetro es 2
   mCodTipoDocCI = CInt(ds.Parametros.Rows(0)(2))

   'combo de Tipo de Documento
   Me.cmbTipoDoc.DataSource = ds.TipoDoc.DefaultView
   Me.cmbTipoDoc.DisplayMember = ds.TipoDoc.DescrTipoDocColumn.ToString
   Me.cmbTipoDoc.ValueMember = ds.TipoDoc.CodTipoDocColumn.ToString
   Me.cmbTipoDoc.SelectedValue = mCodTipoDocCI

   'combo de Lugar de Emisión
   Me.cmbLugarEmision.DataSource = ds.LugarEmision.DefaultView
   ds.LugarEmision.DefaultView.Sort = "CodLugarEmision"
   Me.cmbLugarEmision.DisplayMember = ds.LugarEmision.DescrLugarEmisionColumn.ToString
   Me.cmbLugarEmision.ValueMember = ds.LugarEmision.CodLugarEmisionColumn.ToString
   Me.cmbLugarEmision.SelectedIndex = 0
   Me.cmbLugarEmision.Visible = True

   'combo de Tipos de Persona
   Me.cmbTiposPersona.DataSource = ds.TiposPersona.DefaultView
   ds.TiposPersona.DefaultView.Sort = "CodTiposPersona"
   Me.cmbTiposPersona.DisplayMember = ds.TiposPersona.DescrTiposPersonaColumn.ToString
   Me.cmbTiposPersona.ValueMember = ds.TiposPersona.CodTiposPersonaColumn.ToString

   'combo de Estado Civil
   Me.cmbEstadoCivil.DataSource = ds.EstadoCivil.DefaultView
   ds.EstadoCivil.DefaultView.Sort = "CodEstadoCivil"
   Me.cmbEstadoCivil.DisplayMember = ds.EstadoCivil.DescrEstadoCivilColumn.ToString
   Me.cmbEstadoCivil.ValueMember = ds.EstadoCivil.CodEstadoCivilColumn.ToString

   'combo de Caedec
   Me.cmbCaedec.DataSource = ds.Caedec.DefaultView
   ds.Caedec.DefaultView.Sort = "DescrCaedec"
   Me.cmbCaedec.DisplayMember = ds.Caedec.DescrCaedecColumn.ToString
   Me.cmbCaedec.ValueMember = ds.Caedec.CodCAEDECColumn.ToString

   'combo de Profesiones
   Me.cmbProfesiones.DataSource = ds.Profesiones.DefaultView
   ds.Profesiones.DefaultView.Sort = "DescrProfesiones"
   Me.cmbProfesiones.DisplayMember = ds.Profesiones.DescrProfesionesColumn.ToString
   Me.cmbProfesiones.ValueMember = ds.Profesiones.CodProfesionesColumn.ToString

   'combo de Sexo
   Me.cmbSexo.DataSource = ds.Sexo.DefaultView
   ds.Sexo.DefaultView.Sort = "DescrSexo"
   Me.cmbSexo.DisplayMember = ds.Sexo.DescrSexoColumn.ToString
   Me.cmbSexo.ValueMember = ds.Sexo.CodSexoColumn.ToString

   'combo de TiposVivienda
   Me.cmbTiposVivienda.DataSource = ds.TiposVivienda.DefaultView
   ds.TiposVivienda.DefaultView.Sort = "CodTiposVivienda"
   Me.cmbTiposVivienda.DisplayMember = ds.TiposVivienda.DescrTiposViviendaColumn.ToString
   Me.cmbTiposVivienda.ValueMember = ds.TiposVivienda.CodTiposViviendaColumn.ToString

   'habilitamos solo el tab de ingreso de datos del cliente
   'Me.TabControl1.TabPages.Item(0).Visible = True
   Dim ii As Integer
   For ii = 1 To 4
     Me.TabControl1.TabPages.Item(ii).Enabled = False
   Me.txtCodClienteRUC.BackColor = System.Drawing.Color.White
   Me.txtNombreClienteRUC.BackColor = System.Drawing.Color.White

   'añadimos la grid de RUC
   dgRUC.Visible = False
   'preparamos el tab de acuerdo al estado
   pLim = New clsLimpiarPantallas()
   'El texto del código en blanco aunque esté deshabilitado
   Me.txtCodigo.BackColor = System.Drawing.Color.White

   'habilitamos botones de acuerdo al modo mInsUpd

   If Me.modoClientes = 0 Then
     Me.btnAdd.Enabled = True
     Me.btnModifCliente.Enabled = False
     Me.btnAdd.Enabled = False
     Me.btnModifCliente.Enabled = True
   End If

 End Sub

 Private Sub cmbTipoDoc_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbTipoDoc.SelectedValueChanged
   Dim aa As String = Me.cmbTipoDoc.SelectedValue.GetType.ToString
   If Me.cmbTipoDoc.SelectedValue.GetType.ToString <> "System.Data.DataRowView" Then
     If Me.cmbTipoDoc.SelectedValue = mCodTipoDocCI Then
       Me.cmbLugarEmision.Visible = True
       Me.cmbLugarEmision.Visible = False
     End If
   End If
 End Sub

 Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
   'validamos los campos
   Dim mResul As New ArrayList()
   Dim mValid As New clsValidacion(Me)
   mResul = mValid.ValidarClientes
   If mResul.Count > 0 Then
     Dim sRes As New StringBuilder()
     sRes.Remove(0, sRes.Length)
     Dim mEnum As System.Collections.IEnumerator = mResul.GetEnumerator
     sRes.Append("Por favor corrija los siguientes errores:" & ControlChars.CrLf & ControlChars.CrLf)
     While mEnum.MoveNext()
       sRes.Append(mEnum.Current & ControlChars.CrLf)
     End While
     MessageBox.Show(sRes.ToString, "Errores", MessageBoxButtons.OK, MessageBoxIcon.Error)
     Exit Sub
   End If

   'paso la validación nos creamos una row de la tabla clientes con los datos
   'de la pantalla. Este dataset es nuevo para que solo viajen los datos de la tabla clientes
   'y no los que hemos llenado antes a ds.
   Dim dr As cpd02.dsClientes01.ClientesRow
   dr = dsI.Clientes.NewRow
   dr.ApellidoCasada = Me.txtApellidoCasada.Text
   dr.Celular = Me.txtCelular.Text
   dr.CodCAEDEC = Me.cmbCaedec.SelectedValue
   dr.CodClientes = 1
   dr.CodEstadoCivil = Me.cmbEstadoCivil.SelectedValue
   dr.CodLugarEmision = Me.cmbLugarEmision.SelectedValue
   dr.CodProfesiones = Me.cmbProfesiones.SelectedValue
   dr.CodSexo = Me.cmbSexo.SelectedValue
   dr.CodTipoDoc = Me.cmbTipoDoc.SelectedValue
   dr.CodTiposPersona = Me.cmbTiposPersona.SelectedValue
   dr.CodTiposVivienda = Me.cmbTiposVivienda.SelectedValue
   dr.EMail = Me.txtEMail.Text
   dr.EstacionMod = System.Net.Dns.GetHostName
   dr.FechaMod = DateTime.Now
   dr.LugarNacimiento = Me.txtLugarNacimiento.Text
   dr.FechaNacimiento = Me.dtpFechaNacimiento.Value
   dr.NumCarnetId = Me.txtNumDocumento.Text
   If Me.txtDependientes.Text <> String.Empty And IsNumeric(Me.txtDependientes.Text) Then
     dr.NumDependientes = Me.txtDependientes.Text
   End If
   dr.PrimerApellido = Me.txtPrimerApellido.Text
   dr.PrimerNombre = Me.txtPrimerNombre.Text
   dr.SegundoApellido = Me.txtSegundoApellido.Text
   dr.SegundoNombre = Me.txtSegundoNombre.Text
   dr.UsuarioMod = clsDatosUsuario.usuario
     dsI.Merge(ws.UpdDatos(dsI, tbClientes))
     Me.txtCodigo.Text = dsI.Clientes.Rows(0)(0)
     Dim ii As Integer
     For ii = 1 To 4
       Me.TabControl1.TabPages.Item(ii).Enabled = True
     MessageBox.Show("Se insertó el registro con éxito", "Inserción", MessageBoxButtons.OK, MessageBoxIcon.Information)
   Catch e1 As Exception
     MessageBox.Show("Falla en la actualización de la base de datos." _
             & ControlChars.CrLf & ControlChars.CrLf & _
             e1.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
   End Try

 End Sub

 End Class

Pages: 1 ... 3 4 [5]