Exemple #1
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            string err = string.Empty;

            try
            {
                if (Valid(out err))
                {
                    var entity = new DTO.AvisosDTO();
                    FormsHelper.FillEntity(tblControls, entity);

                    if (!trDuracion.Visible)
                    {
                        (entity as DTO.AvisosDTO).Duracion = null;
                    }

                    Business.Avisos.Create(entity, Atencion);

                    pnlControls.Visible = false;
                    RefreshGrid(gv);
                }
                else
                {
                    throw new Exception(err);
                }
            }
            catch (Exception ex)
            {
                FormsHelper.MsgError(lblError, ex);
            }
        }
Exemple #2
0
        public static bool Insert(DTO.AvisosDTO myAvisosDTO)
        {
            bool resultado = AvisosDAL.Insert(myAvisosDTO);

            return(resultado);
        }
Exemple #3
0
        public static bool Update(DTO.AvisosDTO myAvisosDTO)
        {
            bool resultado = AvisosDAL.Update(myAvisosDTO);

            return(resultado);
        }
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            string err = string.Empty;

            try
            {
                if (Valid(out err))
                {
                    var entity = new DTO.AvisosDTO();
                    FormsHelper.FillEntity(tblControls, entity);

                    if (!trDuracion.Visible)
                        (entity as DTO.AvisosDTO).Duracion = null;

                    Business.Avisos.Create(entity, Atencion);

                    pnlControls.Visible = false;
                    RefreshGrid(gv);
                }
                else
                {
                    throw new Exception(err);
                }
            }
            catch (Exception ex)
            {
                FormsHelper.MsgError(lblError, ex);
            }
        }