miércoles, 26 de marzo de 2014

SQL Server 2008 Database Mail



The Database Mail in SQL Server 2008 provides built-in notifications by e- mail directly from our resort.

Today we will see what are its features and how to configure Email Database in a SQL instance.

The Database Mail allows a computer running SQL Server 2008 send outgoing emails, but even this allows us to outgoing mails can contain even the results of a query is the main objective ALERT send administrators to inform them about the operating conditions or changes have been made to objects.

The Database Mail joined the SQL Server 2005 to replace the SQL Mail, and causes of this replacement were very simple :

Remove dependency on Microsoft Mail Application Programming Interface ( MAPI)
Simplify configuration and administration
Providing a quick and reliable way to send emails

domingo, 25 de septiembre de 2011

Programa del hotel

Esta es la segunda parte que es del Form1

/*
 * Creado por SharpDevelop.
 * Usuario: Alumno
 * Fecha: 09/09/2011
 * Hora: 09:35 a.m.
 *
 * Para cambiar esta plantilla use Herramientas | Opciones | Codificación | Editar Encabezados Estándar
 */
using System;
using System.Drawing;
using System.Windows.Forms;

namespace practica_6
{
    /// <summary>
    /// Description of Form1.
    /// </summary>
    public partial class Form1 : Form
    {
        public Form1()
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();
           
            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //
           
           
        }
       

        void CmbtipohabitacionSelectedIndexChanged(object sender, EventArgs e)
        {
            if(cmbtipohabitacion.Text=="Ninguna")
            {
                pictureBox1.Image=new Bitmap("riu logo.jpg");
            }
            if(cmbtipohabitacion.Text=="Estandar")
            {
                pictureBox1.Image=new Bitmap("habitacion estandar.jpg");
            }
            if(cmbtipohabitacion.Text=="Junior Suite")
            {
                pictureBox1.Image=new Bitmap("habitacion junior.jpg");
            }
            if(cmbtipohabitacion.Text=="Suite")
            {
                pictureBox1.Image=new Bitmap("suite.jpg");
            }
            if(cmbtipohabitacion.Text=="Ninguno")
            {
                pictureBox1.Image=new Bitmap("riu logo.jpg");
            }
        }
       
        void GpbtipoEnter(object sender, EventArgs e)
        {
           
        }
       

        void ChksoloCheckedChanged(object sender, EventArgs e)
        {
            if(chksolo.Checked==true)
            {
                if(cmbtipohabitacion.Text=="Estandar")
                {
                txtimporte.Text=Convert.ToString("1000");
                }
                if(cmbtipohabitacion.Text=="Junior Suite")
                {
                    txtimporte.Text=Convert.ToString("2000");
                }
                if(cmbtipohabitacion.Text=="Suite")
                {
                    txtimporte.Text=Convert.ToString("3000");
                }
            }
           
            txtimporte.Text=Convert.ToString(Convert.ToDouble(txtimporte.Text)*(Convert.ToDouble(txtdias.Text)));
            txtiva.Text=Convert.ToString(Convert.ToDouble(txtimporte.Text)*.16);
            txttotal.Text=(Convert.ToString(Convert.ToDouble(txtimporte.Text) + Convert.ToDouble(txtiva.Text)));
        }
       
        void TxtimporteTextChanged(object sender, EventArgs e)
        {
           
           
        }
           
       
        void ChkdesayunoincCheckedChanged(object sender, EventArgs e)
        {
            if(chkdesayunoinc.Checked==true)
            {
                if(cmbtipohabitacion.Text=="Estandar")
                {
                txtimporte.Text=Convert.ToString("1500");
                }
                if(cmbtipohabitacion.Text=="Junior Suite")
                {
                    txtimporte.Text=Convert.ToString("2500");
                }
                if(cmbtipohabitacion.Text=="Suite")
                {
                    txtimporte.Text=Convert.ToString("3500");
                }
            }
           
            txtimporte.Text=Convert.ToString(Convert.ToDouble(txtimporte.Text)*(Convert.ToDouble(txtdias.Text)));
            txtiva.Text=Convert.ToString(Convert.ToDouble(txtimporte.Text)*.16);
            txttotal.Text=(Convert.ToString(Convert.ToDouble(txtimporte.Text) + Convert.ToDouble(txtiva.Text)));
        }
       
        void ChktodoincluCheckedChanged(object sender, EventArgs e)
        {
            if(chktodoinclu.Checked==true)
            {
                if(cmbtipohabitacion.Text=="Estandar")
                {
                txtimporte.Text=Convert.ToString("2000");
                }
                if(cmbtipohabitacion.Text=="Junior Suite")
                {
                    txtimporte.Text=Convert.ToString("3000");
                }
                if(cmbtipohabitacion.Text=="Suite")
                {
                    txtimporte.Text=Convert.ToString("4000");
                }
            }
       
            txtimporte.Text=Convert.ToString(Convert.ToDouble(txtimporte.Text)*(Convert.ToDouble(txtdias.Text)));
            txtiva.Text=Convert.ToString(Convert.ToDouble(txtimporte.Text)*.16);
            txttotal.Text=(Convert.ToString(Convert.ToDouble(txtimporte.Text) + Convert.ToDouble(txtiva.Text)));
        }
       
        void DtpllegadaValueChanged(object sender, EventArgs e)
        {
            DateTime fecha;
           
       
               
            fecha = dtpllegada.Value;
           
        }
       
        void DtpsalidaValueChanged(object sender, EventArgs e)
        {
            DateTime fecha2;
           
            fecha2 = dtpsalida.Value;
                   
              txtdias.Text =fecha2.DayOfYear.ToString();
       
     txtdias.Text=Convert.ToString(Convert.ToDouble(dtpsalida.Value.DayOfYear)-Convert.ToDouble(dtpllegada.Value.DayOfYear));
   
           
        }
    }
}

Programa del hotel

Se realiza un software para un hotel y lo hare en 2 publicaciones

En esta publicacion pongo lo que va en el MainForm

/*
 * Creado por SharpDevelop.
 * Usuario: Alumno
 * Fecha: 09/09/2011
 * Hora: 09:32 a.m.
 *
 * Para cambiar esta plantilla use Herramientas | Opciones | Codificación | Editar Encabezados Estándar
 */
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;

namespace practica_6
{
    /// <summary>
    /// Description of MainForm.
    /// </summary>
    public partial class MainForm : Form
    {
        public MainForm()
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();
           
            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //
        }
       
        void CmdaceptarClick(object sender, EventArgs e)
        {
            //EN ESTA PARTE VAMOS A VALIDAR AL USUARIO Y CONTRASEÑA
           
            if(txtusuario.Text=="Administrador" && txtcontraseña.Text=="123")
            {
                Form1 x =new Form1();
           
                this.Visible=false;
                x.Show();
               
               
           
            }
            else
            {
                MessageBox.Show("Error");
            }
        }
    }
}

viernes, 12 de agosto de 2011

Aprendizajes del segundo cuatrimestre

En este curso de Programacion de Computadoras aprendi codificar, a ver de una manera visual todo lo que se trabajo en el primer cuatrimestre ya que esas eran las bases para estar preparado al momento de pasar a codigo los algoritmos.
Fue muy satisfactorio este curso aprendi lo que es la programacion orientada a objetos y todas las actividades realizadas me ayudaron a reforzar lo visto y agregar nuevos conocimientos vi lo que son arreglos, objetos, clases, herencia y excepciones y me quedo con todo eso para el cuatrimestre que viene reforzarlo y aprender mas.

jueves, 28 de julio de 2011

viernes, 15 de julio de 2011

Actividad 8

En este programa se le pide al usuario el tamaño del lado de un cuadro y su tamaño va del rango entre el 1y 20
y segun sea el tamaño del lado se imprimira en pantalla el cuadro con esa medida

/*
 * Creado por SharpDevelop.
 * Usuario: Jose
 * Fecha: 13/07/2011
 * Hora: 05:11 p.m.
 *
 * Para cambiar esta plantilla use Herramientas | Opciones | Codificación | Editar Encabezados Estándar
 */
using System;

namespace ejercicio_8
{
    class Program
    {
        public static void Main(string[] args)
        {
            int x, y, z;
            do
            {
               
            Console.WriteLine("Introduce un numero entero entre 1 y 20");
            z = int.Parse(Console.ReadLine());
           
                       
            for(x=1; x<=z; x++)
            {
                for (y=1; y<=z; y++)
                {
                    Console.Write("* ");
                }
               
                Console.WriteLine();
            }
           
            } while(z>=1 && z<=20);
           
            Console.ReadKey(true);
        }
    }
}

Actividad 5

En este programa el usuario puede ingresar un numero entero y no saldra de este siempre y cuando no ingrese un numero entre 10 y 15

/*
 * Creado por SharpDevelop.
 * Usuario: Jose
 * Fecha: 11/07/2011
 * Hora: 06:58 p.m.
 *
 * Para cambiar esta plantilla use Herramientas | Opciones | Codificación | Editar Encabezados Estándar
 */
using System;

namespace ejercicio_5
{
    class Program
    {
        public static void Main(string[] args)
        {
            int num;
           
            Console.WriteLine("Ingresa un numero");
            num=int.Parse(Console.ReadLine());
            while (num>=15 || num<=10)
            {
            Console.WriteLine("Ingresa un numero");
            num=int.Parse(Console.ReadLine());
           
           
            }
           
            Console.ReadKey(true);
        }
    }
}