Beispiel #1
0
        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;
        }
Beispiel #2
0
        public void addScore(ArccView arccView)
        {
            ARCCDbContext db = new ARCCDbContext();


            db.scoreDB.Add(arccView.score);
            db.SaveChanges();
        }
Beispiel #3
0
        // private ArccView userEmailreturn = new ArccView();
        public void insertSecurityUser(ArccView arccView)
        {
            ARCCDbContext db = new ARCCDbContext();

            db.securityDB.Add(arccView.user);
            db.SaveChanges();
            insertScore(arccView);
        }
Beispiel #4
0
        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;
            }
        }
Beispiel #5
0
 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;
 }
Beispiel #6
0
        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);
            }
        }
Beispiel #7
0
        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();
        }
Beispiel #8
0
        public void commit(ArccView arccView)
        {
            ARCCDbContext db = new ARCCDbContext();

            db.SaveChanges();
        }
Beispiel #9
0
 public string getUserEmail(ArccView arccView)
 {
     return(arccView.userEmail.ToString());
 }