Exemplo n.º 1
0
        protected void btnGuardar_Click(object sender, EventArgs e)
        {
            String   tipo           = ddlActividad.SelectedValue;
            DateTime fechaActividad = Convert.ToDateTime(convertirAFechaAmericana(txbFechaActividad.Text));
            String   notas          = txbNotas.Text;

            try
            {
                if (bdTS.actNuevaActividad(S, F, tipo, fechaActividad.ToString("yyyy-MM-dd HH:mm:ss"), U, notas))
                {
                    llenarGdvActividades();
                    prepararPnlNuevoActividad();
                    mst.mostrarMsjNtf(dic.msjSeHaIngresado);
                }
                else
                {
                    if (L.Equals("es"))
                    {
                        mst.mostrarMsjAdvNtf("Una familia solo puede tener una actividad de cada tipo, el mismo dia.");
                    }
                    else
                    {
                        mst.mostrarMsjAdvNtf("A family can only have one activity of each type, the same day.");
                    }
                }
            }
            catch (Exception ex)
            {
                mst.mostrarMsjMdl(dic.msjNoSeRealizoExcp + ex.Message.ToString() + ".");
            }
        }