public void UpdateProfile(AppProfiles profile) { _db.AppProfiles.AddOrUpdate(profile); Commit(); }
private void InsertProfile() { if(!ValidaProfile()) return; try { var profile = new AppProfiles { ProfileDescription = txtProfile.Text, CreationDate = DateTime.Now }; _db.InsertProfile(profile); } catch (EntityException ex) { MessageBox.Show(Resources.ERROR_INSERT_PROFILE + ex.Message, Text, MessageBoxButtons.OK, MessageBoxIcon.Error); cmdSalvar.Enabled = true; return; } _frmUtil.SetMessageError(ref tssStatus, true, "Perfil inserido com sucesso!", AppFormUtil.StatusForm.Success); GetAllProfiles(); ControlesPerfil(TypeTransaction.Clear); }
public void InsertProfile(AppProfiles profile) { _db.AppProfiles.Add(profile); Commit(); }