Ejemplo n.º 1
0
        public bool Eliminar(int idCTS)
        {
            try
            {
                int rowsAffected = new DA.CTS().Eliminar(idCTS);

                return(rowsAffected > 0);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 2
0
        public BE.UI.CTS Obtener(int idCTS)
        {
            try
            {
                var beCTS = new DA.CTS().Obtener(idCTS);

                var uiCTS = this.BeToUi(beCTS);

                return(uiCTS);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 3
0
        public bool Actualizar(BE.UI.CTS uiCTS)
        {
            try
            {
                var beCTS = this.UiToBe(uiCTS);

                int rowsAffected = new DA.CTS().Actualizar(beCTS);

                return(rowsAffected > 0);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 4
0
        public bool Insertar(ref BE.UI.CTS uiCTS)
        {
            try
            {
                var beCTS = this.UiToBe(uiCTS);

                int rowsAffected = new DA.CTS().Insertar(ref beCTS);
                if (rowsAffected > 0)
                {
                    uiCTS.Id = beCTS.IdCts;
                }

                return(rowsAffected > 0);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 5
0
        public List <BE.UI.CTS> Listar()
        {
            try
            {
                List <BE.UI.CTS> lstUiCTS = new List <BE.UI.CTS>();

                List <BE.CTS> lstBeCTSs = new DA.CTS().Listar();
                foreach (BE.CTS beCTS in lstBeCTSs)
                {
                    var uiCTS = this.BeToUi(beCTS);
                    lstUiCTS.Add(uiCTS);
                }

                return(lstUiCTS);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }