Professional Documents
Culture Documents
Versin: Fecha:
1.0 26/05/2013
Historial de Revisiones
Fecha 12/05/2013 Versin 1.0 Versin Inicial Descripcin Autor
Confidencial
UCV-ING-SOFT-01 2013
Pg. 2
Versin: Fecha:
1.0 26/05/2013
Tabla de Contenidos
1 Introduccin 1.1 1.2 1.3 1.4 2 3 Propsito Vista General Referencias Definicin de Trminos, Abreviaturas y Siglas 4 4 4 5 6 6 8 Organizacin de la Vista 8 12 12 15 16
Confidencial
UCV-ING-SOFT-01 2013
Pg. 3
Versin: Fecha:
1.0 26/05/2013
Arquitectura Integra
1 Introduccin
Existen distintos tipos de patrones para la creacin de software, debido a ello es necesario definir en la etapa inicial la arquitectura que se usa a lo largo del proyecto. El presente documento recopila la informacin sobre la arquitectura en Capas (Layers) que se usara para la construccin del software, dicha arquitectura hace extenso uso de la programacin modular lo que permite sacar un provecho excepcional de las caractersticas de lenguajes de programacin orientada a objetos (en el caso de C#). Detallando a continuacin los patrones de diseo de software en general.
1.1
Propsito
El presente documento tiene como objetivo la optimizacin del proceso de desarrollo del sistema Web Neo para el control de pacientes neonatal del Hospital Daniel Alcides Carrin. De acuerdo con las reuniones realizadas, los Stakeholders se ha optado utilizar como eje primordial del desarrollo la arquitectura de capas (Layers) lo cual repercutir desde el modelamiento de la solucin hasta la implementacin.
1.2
Vista General
La arquitectura por capas se subdivide al proceso de desarrollo en 3 capas esenciales: Capa de Presentacin (Capa de Usuario) Capa de Procesamiento de Datos (Control o Negocio) Capa de Almacenamiento de Datos (Persistencia)
El tipo de desarrollo mencionado permitir que la construccin de forma independiente que permite la reutilizacin de clases, cdigos de acceso a datos o interfaces de usuarios. Para la construccin de estas capas se utilizara el IDE Visual Studio.Net 2005 y el proceso de gestin de ALM (Application Life Management) integrndolo el IDE con Visual Studio Team Explore 2005. El versionamiento y el almacenamiento de las fuentes se llevaran a cabo en un servidor Team Founddation Server 2010 en su edicin express (distribucin libre con fines didcticos). Este servidor permitir trabajar el mismo proyecto en forma colaborativa para asignar las tareas en forma de Contribucin.
Confidencial
UCV-ING-SOFT-01 2013
Pg. 4
Versin: Fecha:
1.0 26/05/2013
1.3
Referencias
Glosario. Prototipos RUP (Rational Unified Process). Diagrama de casos de uso. Gestin de la Configuracin.
Confidencial
UCV-ING-SOFT-01 2013
Pg. 5
Versin: Fecha:
1.0 26/05/2013
1.4
Confidencial
UCV-ING-SOFT-01 2013
Pg. 6
Versin: Fecha:
1.0 26/05/2013
Confidencial
UCV-ING-SOFT-01 2013
Pg. 7
Versin: Fecha:
1.0 26/05/2013
Vista
La vista estar conformada por todas las clases de la capa presentacin (Layer). Adems esta ser la encargada de llamar a las clases del tipo controlador y se encargaran de interactuar entre el usuario y el sistema.
3.1
Organizacin de la Vista
Cada elemento de la Vista posee un prefijo identificador de la funcin que desempea (Listar, Registrar) y el tipo de entidad que manipulara (ejem: Registro Bsico, Registro Postnatal, etc.) La implementacin de cada Vista es realizada segn la descripcin de los CUS en el documento PE-ELCUI de la fase de elaboracin.
La vista ser conformada por los archivso ASPX generados para el proyecto. Cdigo de implementacin de la Vista Registro Bsico: <%@ Page Language="C#" MasterPageFile="~/default.master" AutoEventWireup="true" CodeFile="Agregar_registro_postnatal.aspx.cs" Inherits="Agregar_registro_inicial" %> <%@ Register Src="includes/ucRightMenu.ascx" TagName="ucRightMenu" TagPrefix="uc1" %> <asp:Content ID="cMainContent" runat="server" ContentPlaceHolderID="cphMain"> <script type="text/javascript" src="scripts_marcianos.js"></script> <div class="title">Agregar/Editar Registros Postnatales<br /> <asp:ScriptManager ID="ScriptManager2" runat="server"></asp:ScriptManager><hr style="border-left-color: #cdcdcd; border-bottom-color: #cdcdcd; Confidencial UCV-ING-SOFT-01 2013 Pg. 8
Versin: Fecha:
1.0 26/05/2013
border-top-style: dotted; border-top-color: #cdcdcd; border-rightstyle: dotted; border-left-style: dotted; border-right-color: #cdcdcd; border-bottomstyle: dotted" /> </div> <table cellpadding="5" cellspacing="5" border="0" width="450" align="center" style="font-size: 9pt"> <tr> <td align="center" colspan="2" style="text-align: left"> <strong><span style="font-size: 10pt"> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label></span></strong></td> </tr> </table> <table cellpadding="5" cellspacing="5" border="0" width="450" align="center" style="font-size: 9pt"> <tr> <td align="center" colspan="2" style="text-align: left"> <strong> <span style="font-size: 10pt"> Factores Postnatales N Hist.<asp:TextBox ID="txthistoria" runat="server" MaxLength="7" ReadOnly="True" Width="54px"></asp:TextBox></span></strong></td> </tr> <tr> <td> Motivo Ing.</td> <td> <asp:TextBox ID="txtmotivo" runat="server" CssClass="input300" Width="163px"></asp:TextBox> Destino <asp:DropDownList ID="combodestino" runat="server" Style="width: 110px" Font-Size="9pt"> <asp:ListItem Value="UCI">UCI</asp:ListItem> <asp:ListItem Value="Intermedios">Intermedios</asp:ListItem> </asp:DropDownList> </td> </tr> </table> <table cellpadding="5" cellspacing="5" border="0" width="500" style="font-size: 9pt; text-align: left;"> <tr> <td> <br /> Sulfact. <asp:DropDownList ID="combosulf" runat="server" AutoPostBack="True" Font-Size="9pt" OnSelectedIndexChanged="combosulf_SelectedIndexChanged" Style="width: 45px"> <asp:ListItem Value="0">No</asp:ListItem> <asp:ListItem Value="1">Si</asp:ListItem> Confidencial UCV-ING-SOFT-01 2013 Pg. 9
Versin: Fecha:
1.0 26/05/2013
</asp:DropDownList><br /> <br /> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> 1Dos <asp:TextBox id="txtsulf" runat="server" Width="25px" ReadOnly="True" MaxLength="2" CssClass="input300" __designer:wfdid="w1"></asp:TextBox> Hr.<BR /> 2Dos <asp:TextBox id="txtsulf2" runat="server" Width="25px" ReadOnly="True" MaxLength="2" CssClass="input300" __designer:wfdid="w2"></asp:TextBox> Hr.<BR /> Foto <asp:TextBox id="txtfotot" runat="server" Width="25px" ReadOnly="True" MaxLength="2" CssClass="input300" __designer:wfdid="w3"></asp:TextBox> Dias<BR /><BR /> </contenttemplate> <triggers> <asp:AsyncPostBackTrigger ControlID="combosulf" EventName="SelectedIndexChanged"></asp:AsyncPostBackTrigger> </triggers> </asp:UpdatePanel> </td> <td> Antibiticos<asp:DropDownList ID="comboanti" runat="server" AutoPostBack="True" Font-Size="9pt" OnSelectedIndexChanged="comboanti_SelectedIndexChanged" Style="width: 45px"> <asp:ListItem Value="0">No</asp:ListItem> <asp:ListItem Value="1">Si</asp:ListItem> </asp:DropDownList><br /> <asp:UpdatePanel ID="UpdatePanel3" runat="server"> <ContentTemplate> 1esq.<asp:TextBox id="txtanti1" runat="server" Width="62px" ReadOnly="True" MaxLength="7" CssClass="input300" __designer:wfdid="w12"></asp:TextBox><BR /> 2esq.<asp:TextBox id="txtanti2" runat="server" Width="62px" ReadOnly="True" MaxLength="7" CssClass="input300" __designer:wfdid="w13"></asp:TextBox><BR /> 3esq.<asp:TextBox id="txtanti3" runat="server" Width="62px" ReadOnly="True" MaxLength="7" CssClass="input300" __designer:wfdid="w14"></asp:TextBox><BR /> 4esq.<asp:TextBox id="txtanti4" runat="server" Width="62px" ReadOnly="True" MaxLength="7" CssClass="input300" __designer:wfdid="w15"></asp:TextBox> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="comboanti" EventName="SelectedIndexChanged"></asp:AsyncPostBackTrigger> </Triggers> </asp:UpdatePanel> </td> <td style="width: 158px"> N Fecha<br /> Exang <asp:TextBox ID="txtexangn" runat="server" CssClass="input300" Width="11px" MaxLength="1"></asp:TextBox><asp:TextBox ID="txtexangf" runat="server" CssClass="input300" Width="60px"></asp:TextBox><a href="javascript:NewCal('<%=txtexangf.ClientID Confidencial UCV-ING-SOFT-01 2013 Pg. 10
Versin: Fecha:
1.0 26/05/2013
%>','ddmmyyyy')"><img src="images/cal.gif" width="16" height="17" border="0" alt="Pick a date"></a><br /> PG <asp:TextBox ID="txtpgn" runat="server" CssClass="input300" Width="11px" MaxLength="1"></asp:TextBox><asp:TextBox ID="txtpgf" runat="server" CssClass="input300" Width="60px"></asp:TextBox><a href="javascript:NewCal('<%=txtpgf.ClientID %>','ddmmyyyy')"><img src="images/cal.gif" width="16" height="16" border="0" alt="Pick a date"></a><br /> Plaq <asp:TextBox ID="txtplaq" runat="server" CssClass="input300" Width="11px" MaxLength="1"></asp:TextBox><asp:TextBox ID="txtplaqf" runat="server" CssClass="input300" Width="60px"></asp:TextBox><a href="javascript:NewCal('<%=txtplaqf.ClientID %>','ddmmyyyy')"><img src="images/cal.gif" width="16" height="16" border="0" alt="Pick a date"></a><br /> PFC <asp:TextBox ID="txtpfc" runat="server" CssClass="input300" Width="11px" MaxLength="1"></asp:TextBox><asp:TextBox ID="txtpfcf" runat="server" CssClass="input300" Width="60px"></asp:TextBox><a href="javascript:NewCal('<%=txtpfcf.ClientID %>','ddmmyyyy')"><img src="images/cal.gif" width="16" height="16" border="0" alt="Pick a date"></a><br /> </td> </tr> </table> <table cellpadding="5" cellspacing="5" border="0" width="450" align="center" style="font-size: 9pt"> <tr> <td> Vit ACD <asp:DropDownList ID="comboacd" runat="server" Font-Size="9pt" OnSelectedIndexChanged="combosulf_SelectedIndexChanged" Style="width: 45px"> <asp:ListItem Value="0">No</asp:ListItem> <asp:ListItem Value="1">Si</asp:ListItem> </asp:DropDownList> VitE <asp:DropDownList ID="comboe" runat="server" Font-Size="9pt" OnSelectedIndexChanged="combosulf_SelectedIndexChanged" Style="width: 45px"> <asp:ListItem Value="0">No</asp:ListItem> <asp:ListItem Value="1">Si</asp:ListItem> </asp:DropDownList> Vol3s <asp:TextBox ID="txtvol3" runat="server" CssClass="input300" Width="64px"></asp:TextBox> Vol4s <asp:TextBox ID="txtvol4" runat="server" CssClass="input300" Width="64px"></asp:TextBox></td> </tr> <tr> <td colspan="2" align="center"> <br /> <asp:Button ID="btnUpdate" runat="server" CssClass="buttonBlue" Text="Actualizar" OnClick="btnUpdate_Click"/> <asp:Button ID="btnCancel" runat="server" CssClass="buttonBlue" Text="Cancelar" CausesValidation="False" OnClick="btnCancel_Click" /> Confidencial UCV-ING-SOFT-01 2013 Pg. 11
Versin: Fecha:
1.0 26/05/2013
</td> </tr> </table> </asp:Content> <asp:Content ID="cRightMenu" runat="server" ContentPlaceHolderID="cphRight"> <uc1:ucRightMenu ID="UcRightMenu1" runat="server" /> </asp:Content>
Controlador
La capa Controlador es la encargada de actuar como Middleware entre la vista (Interfaz grfica) y el modelo (Lgica de Negocio y Entidades)
4.1
En el siguiente ejemplo se muestra la interaccin entre la Vista (representada por una frontera) el Control (representado por una clase control)
Confidencial
UCV-ING-SOFT-01 2013
Pg. 12
Versin: Fecha:
1.0 26/05/2013
Cdigo de la clase: public partial class Agregar_registro_inicial : System.Web.UI.Page { clspostnatal objpostnatal = new clspostnatal(); protected void Page_Load(object sender, EventArgs e) { txtsulf.Attributes.Add("onkeypress", "return validarNumero(event)"); txtsulf2.Attributes.Add("onkeypress", "return validarNumero(event)"); txtfotot.Attributes.Add("onkeypress", "return validarNumero(event)"); txtexangf.Attributes.Add("onkeypress", "return validarNumero(event)"); txtpgn.Attributes.Add("onkeypress", "return validarNumero(event)"); txtplaq.Attributes.Add("onkeypress", "return validarNumero(event)"); txtpfc.Attributes.Add("onkeypress", "return validarNumero(event)"); txtexangf.Attributes.Add("onKeyDown", "javascript: return false;"); txtpgf.Attributes.Add("onKeyDown", "javascript: return false;"); txtplaqf.Attributes.Add("onKeyDown", "javascript: return false;"); txtpfcf.Attributes.Add("onKeyDown", "javascript: return false;"); if (!IsPostBack) { if (Request["BebeID"] != null) { txthistoria.Text = Request["BebeID"].ToString(); Label1.Text=Request["Bebenombre"].ToString(); getBebepostnatal(Convert.ToInt32(txthistoria.Text)); } } Confidencial UCV-ING-SOFT-01 2013 Pg. 13
Versin: Fecha:
1.0 26/05/2013
protected void getBebepostnatal (int n_hn) { objpostnatal.n_hn = n_hn; objpostnatal.SelectById(); txtmotivo.Text = objpostnatal.motivo_ingreso.ToString(); combodestino.SelectedValue = objpostnatal.destino.ToString(); combosulf.SelectedValue = objpostnatal.sulfactante.ToString(); combosulf_SelectedIndexChanged(null, null); txtsulf.Text = objpostnatal.pra_dosis.ToString(); txtsulf2.Text = objpostnatal.sda_dosis.ToString(); txtfotot.Text = objpostnatal.fototerapia.ToString(); comboanti.SelectedValue = objpostnatal.antibiotico.ToString(); comboanti_SelectedIndexChanged(null,null); txtanti1.Text = objpostnatal.p_esq.ToString(); txtanti2.Text = objpostnatal.s_esq.ToString(); txtanti3.Text = objpostnatal.t_esq.ToString(); txtanti4.Text = objpostnatal.c_esq.ToString(); txtexangn.Text = objpostnatal.exang.ToString(); txtexangf.Text = objpostnatal.fec_exang.ToShortDateString(); txtpgn.Text = objpostnatal.pg.ToString(); txtpgf.Text = objpostnatal.fec_pg.ToShortDateString(); txtplaq.Text = objpostnatal.plaq.ToString(); txtplaqf.Text = objpostnatal.fec_plaq.ToShortDateString(); txtpfc.Text = objpostnatal.pfc.ToString(); txtpfcf.Text = objpostnatal.fec_pfc.ToShortDateString(); comboacd.SelectedValue = objpostnatal.vitamina_acd.ToString(); comboe.SelectedValue = objpostnatal.vit_e.ToString(); txtvol3.Text = objpostnatal.vol_3.ToString(); txtvol4.Text = objpostnatal.vol_4.ToString(); } protected void btnCancel_Click(object sender, EventArgs e) { Response.Redirect("Default.aspx"); } protected void combosulf_SelectedIndexChanged(object sender, EventArgs e) { if (combosulf.SelectedValue == "0") { txtsulf.Text = ""; txtsulf2.Text = ""; txtfotot.Text = ""; txtsulf.ReadOnly = true; txtsulf2.ReadOnly = true; txtfotot.ReadOnly = true; } else { txtsulf.ReadOnly = false; txtsulf2.ReadOnly = false; txtfotot.ReadOnly = false; } } protected void comboanti_SelectedIndexChanged(object sender, EventArgs e) { Confidencial UCV-ING-SOFT-01 2013 Pg. 14
Versin: Fecha:
1.0 26/05/2013
if (comboanti.SelectedValue == "0") { txtanti1.Text = ""; txtanti2.Text = ""; txtanti3.Text = ""; txtanti4.Text = ""; txtanti1.ReadOnly = true; txtanti2.ReadOnly = true; txtanti3.ReadOnly = true; txtanti4.ReadOnly = true; } else { txtanti1.ReadOnly = false; txtanti2.ReadOnly = false; txtanti3.ReadOnly = false; txtanti4.ReadOnly = false; } } protected void btnUpdate_Click(object sender, EventArgs e) { objpostnatal.n_hn = Convert.ToInt32(txthistoria.Text.Trim()) ; objpostnatal.motivo_ingreso = txtmotivo.Text.Trim(); objpostnatal.destino = combodestino.SelectedValue.ToString(); objpostnatal.sulfactante = Convert.ToInt32(combosulf.SelectedValue); objpostnatal.pra_dosis = txtsulf.Text.Trim(); objpostnatal.sda_dosis = txtsulf2.Text.Trim(); objpostnatal.fototerapia = txtfotot.Text.Trim(); objpostnatal.vitamina_acd = Convert.ToInt32(comboacd.SelectedValue); objpostnatal.vit_e = Convert.ToInt32(comboe.SelectedValue); objpostnatal.vol_3 = txtvol3.Text.Trim(); objpostnatal.vol_4 = txtvol4.Text.Trim(); objpostnatal.antibiotico = Convert.ToInt32(comboanti.SelectedValue); objpostnatal.p_esq = txtanti1.Text.Trim(); objpostnatal.s_esq = txtanti2.Text.Trim(); objpostnatal.t_esq = txtanti3.Text.Trim(); objpostnatal.c_esq = txtanti4.Text.Trim(); objpostnatal.exang = txtexangn.Text.Trim(); objpostnatal.fec_exang = Convert.ToDateTime(txtexangf.Text); objpostnatal.pg = txtpgn.Text.Trim(); objpostnatal.fec_pg = Convert.ToDateTime(txtpgf.Text); objpostnatal.plaq = txtplaq.Text.Trim(); objpostnatal.fec_plaq = Convert.ToDateTime(txtplaqf.Text); objpostnatal.pfc = txtpfc.Text.Trim(); objpostnatal.fec_pfc = Convert.ToDateTime(txtpfcf.Text); objpostnatal.Update(); Response.Redirect("Listado_neo_activos.aspx?BebeID=" + txthistoria.Text); } }
Modelo
El modelo ser implementado por las clases de C# del tipo negocio y entidad. Estas clases generarn *DLL reutilizables promoviendo la reutilizacin.
Confidencial
UCV-ING-SOFT-01 2013
Pg. 15
Versin: Fecha:
1.0 26/05/2013
5.1
Cdigo de una clase Modelo namespace neonatos.BLL { public class clspostnatal { public clspostnatal() { // // TODO: Add constructor logic here // } #region Variables DBBridge objDBBridge = new DBBridge(); protected int _n_hn; protected string _motivo_ingreso = String.Empty; protected string _destino=string.Empty; protected int _sulfactante; protected string _pra_dosis=string.Empty; protected string _sda_dosis=string.Empty; protected string _fototerapia=string.Empty; protected int _vitamina_acd; protected int _vit_e; protected string _vol_3=string.Empty; protected string _vol_4=string.Empty; protected int _antibiotico; protected string _p_esq =string.Empty; protected string _s_esq =string.Empty; protected string _t_esq =string.Empty; protected string _c_esq= string.Empty; protected string _exang =string.Empty;
Confidencial
UCV-ING-SOFT-01 2013
Pg. 16
Web Neo Arquitectura Arquitectura Integra protected DateTime _fec_exang; protected string _pg = string.Empty; protected DateTime _fec_pg; protected string _plaq =string.Empty; protected DateTime _fec_plaq; protected string _pfc = string.Empty; protected DateTime _fec_pfc; const string _spName = "sp_postnatal"; #endregion #region Class Property public int n_hn { get { return _n_hn; } set { _n_hn = value; } } public string motivo_ingreso { get { return _motivo_ingreso; } set { _motivo_ingreso = value; } } public string destino { get { return _destino; } set { _destino = value; } } public int sulfactante { get { return _sulfactante; } set { _sulfactante = value; } } public string pra_dosis { get { return _pra_dosis; } set { _pra_dosis = value; } } public string sda_dosis { get { return _sda_dosis; } set { _sda_dosis = value; } } public string fototerapia { get { return _fototerapia; } set { _fototerapia = value; } } public int vitamina_acd { Confidencial UCV-ING-SOFT-01 2013
Versin: Fecha:
1.0 26/05/2013
Pg. 17
Web Neo Arquitectura Arquitectura Integra get { return _vitamina_acd; } set { _vitamina_acd = value; } } public int vit_e { get { return _vit_e; } set { _vit_e = value; } } public string vol_3 { get { return _vol_3; } set { _vol_3 = value; } } public string vol_4 { get { return _vol_4; } set { _vol_4 = value; } } public int antibiotico { get { return _antibiotico; } set { _antibiotico = value; } } public string p_esq { get { return _p_esq; } set { _p_esq = value; } } public string s_esq { get { return _s_esq; } set { _s_esq = value; } } public string t_esq { get { return _t_esq; } set { _t_esq = value; } } public string c_esq { get { return _c_esq; } set { _c_esq = value; } } public string exang { get { return _exang; } Confidencial UCV-ING-SOFT-01 2013
Versin: Fecha:
1.0 26/05/2013
Pg. 18
Web Neo Arquitectura Arquitectura Integra set { _exang = value; } } public DateTime fec_exang { get { return _fec_exang; } set { _fec_exang = value; } } public string pg { get { return _pg; } set { _pg = value; } } public DateTime fec_pg { get { return _fec_pg; } set { _fec_pg = value; } } public string plaq { get { return _plaq; } set { _plaq = value; } } public DateTime fec_plaq { get { return _fec_plaq; } set { _fec_plaq = value; } } public string pfc { get { return _pfc; } set { _pfc = value; } } public DateTime fec_pfc { get { return _fec_pfc; } set { _fec_pfc = value; } } #endregion #region Public Methods
Versin: Fecha:
1.0 26/05/2013
public int Update() { SqlParameter[] param = new SqlParameter[25]; param[0] = new SqlParameter("@modo", "Actualizar"); param[1] = new SqlParameter("@n_hn", _n_hn); param[2] = new SqlParameter("@motivo_ingreso" , _motivo_ingreso); param[3] = new SqlParameter("@destino" , _destino); Confidencial UCV-ING-SOFT-01 2013 Pg. 19
Versin: Fecha:
1.0 26/05/2013
param[4] = new SqlParameter("@sulfactante" , _sulfactante); param[5] = new SqlParameter("@pra_dosis" , _pra_dosis); param[6] = new SqlParameter("@sda_dosis" , _sda_dosis); param[7] = new SqlParameter("@fototerapia" , _fototerapia); param[8] = new SqlParameter("@vitamina_acd" , _vitamina_acd); param[9] = new SqlParameter("@vit_e" , _vit_e); param[10] = new SqlParameter("@vol_3" , _vol_3); param[11] = new SqlParameter("@vol_4" , _vol_4); param[12] = new SqlParameter("@antibiotico" , _antibiotico); param[13] = new SqlParameter("@p_esq" , _p_esq); param[14] = new SqlParameter("@s_esq" , _s_esq); param[15] = new SqlParameter("@t_esq" , _t_esq); param[16] = new SqlParameter("@c_esq" , _c_esq); param[17] = new SqlParameter("@exang" , _exang); param[18] = new SqlParameter("@fec_exang" , _fec_exang); param[19] = new SqlParameter("@pg" , _pg); param[20] = new SqlParameter("@fec_pg" , _fec_pg); param[21] = new SqlParameter("@plaq" , _plaq); param[22] = new SqlParameter("@fec_plaq" , _fec_plaq); param[23] = new SqlParameter("@pfc" , _pfc); param[24] = new SqlParameter("@fec_pfc" , _fec_pfc); return objDBBridge.ExecuteNonQuery(_spName, param); } public void SelectById() { SqlParameter[] param = new SqlParameter[2]; param[0] = new SqlParameter("@modo", "ListarporID"); param[1] = new SqlParameter("@n_hn", _n_hn); DataTable dtpostnatal = new DataTable(); dtpostnatal = objDBBridge.ExecuteDataset(_spName, param).Tables[0]; if (dtpostnatal.Rows.Count != 0) { DataRow drpostnatal; drpostnatal = dtpostnatal.Rows[0]; _motivo_ingreso = drpostnatal["motivo_ingreso"].ToString(); _destino = drpostnatal["destino"].ToString(); _sulfactante = Convert.ToInt32(drpostnatal["sulfactante"]); _pra_dosis = drpostnatal["pra_dosis"].ToString(); _sda_dosis = drpostnatal["sda_dosis"].ToString(); _fototerapia = drpostnatal["fototerapia"].ToString(); _vitamina_acd = Convert.ToInt32(drpostnatal["vitamina_acd"]); _vit_e = Convert.ToInt32(drpostnatal["vit_e"]); _vol_3 = drpostnatal["vol_3"].ToString(); _vol_4 = drpostnatal["vol_4"].ToString(); _antibiotico = Convert.ToInt32(drpostnatal["antibiotico"]); _p_esq = drpostnatal["p_esq"].ToString(); _s_esq = drpostnatal["s_esq"].ToString(); _t_esq = drpostnatal["t_esq"].ToString(); _c_esq = drpostnatal["c_esq"].ToString(); _exang = drpostnatal["exang"].ToString(); if (drpostnatal["fec_exang"] != DBNull.Value)
Confidencial
UCV-ING-SOFT-01 2013
Pg. 20
Web Neo Arquitectura Arquitectura Integra _fec_exang = Convert.ToDateTime(drpostnatal["fec_exang"]); else _fec_exang = DateTime.Today;
Versin: Fecha:
1.0 26/05/2013
_pg = drpostnatal["pg"].ToString(); if (drpostnatal["fec_pg"] != DBNull.Value) _fec_pg = Convert.ToDateTime(drpostnatal["fec_pg"]); else _fec_pg = DateTime.Today; _plaq = drpostnatal["plaq"].ToString(); if (drpostnatal["fec_plaq"] != DBNull.Value) _fec_plaq = Convert.ToDateTime(drpostnatal["fec_plaq"]); else _fec_plaq = DateTime.Today; _pfc = drpostnatal["pfc"].ToString(); if (drpostnatal["fec_pfc"] != DBNull.Value) _fec_pfc = Convert.ToDateTime(drpostnatal["fec_pfc"]); else _fec_pfc = DateTime.Today; } } #endregion } }
Confidencial
UCV-ING-SOFT-01 2013
Pg. 21