public void getAllProposals(ArccView arccView) { // var scores = db.scoreDB.Select(u => new { u.Proposal_Name, u.Education_Exp, u.Innovation, u.Dissemination, u.Evaluation, u.Support }).AsEnumerable(); ARCCDbContext db = new ARCCDbContext(); List <SCORE> scoreDatabase = db.scoreDB.ToList(); arccView.scores = scoreDatabase; }
public void addScore(ArccView arccView) { ARCCDbContext db = new ARCCDbContext(); db.scoreDB.Add(arccView.score); db.SaveChanges(); }
// private ArccView userEmailreturn = new ArccView(); public void insertSecurityUser(ArccView arccView) { ARCCDbContext db = new ARCCDbContext(); db.securityDB.Add(arccView.user); db.SaveChanges(); insertScore(arccView); }
public void setProposalName(ArccView arccView) { ARCCDbContext db = new ARCCDbContext(); SECURITY user = db.securityDB.Where(u => u.Email.Equals(arccView.user.Email) && u.Password.Equals(arccView.user.Password)).FirstOrDefault(); for (int i = 0; i < arccView.scores.Count; i++) { arccView.scores[i].Proposal_Name = user.LastName; } }
public void dummyData(ArccView arccView) { arccView.user.FirstName = "Kaiya"; arccView.user.LastName = "Login"; arccView.user.Email = "*****@*****.**"; arccView.user.Password = "******"; arccView.scores[0].Proposal_Name = "Rague"; arccView.scores[0].Education_Exp = 0; arccView.scores[0].Innovation = 1; arccView.scores[0].Dissemination = 2; arccView.scores[0].Evaluation = 3; arccView.scores[0].Support = 4; }
public bool checkLogin(ArccView arccView) { ARCCDbContext db = new ARCCDbContext(); SECURITY user = db.securityDB.Where(u => u.Email.Equals(arccView.user.Email) && u.Password.Equals(arccView.user.Password)).FirstOrDefault(); if (user != null) { return(true); } else { return(false); } }
public void insertScore(ArccView arccView) { ARCCDbContext db = new ARCCDbContext(); SCORE arccView2 = new SCORE(); db.Database.ExecuteSqlCommand("TRUNCATE TABLE [SCORE]"); for (int i = 0; i < arccView.scores.Count; i++) { if (arccView.scores[i].Proposal_Name != null) { db.scoreDB.Add(arccView.scores[i]); } } db.SaveChanges(); }
public void commit(ArccView arccView) { ARCCDbContext db = new ARCCDbContext(); db.SaveChanges(); }
public string getUserEmail(ArccView arccView) { return(arccView.userEmail.ToString()); }