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); } }
public static bool Insert(DTO.AvisosDTO myAvisosDTO) { bool resultado = AvisosDAL.Insert(myAvisosDTO); return(resultado); }
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); } }