Beispiel #1
0
        public int AddManagerInfo(mis_manager misManager)
        {
            helpsEntities helps = new helpsEntities();

            helps.mis_manager.Add(misManager);
            helps.SaveChanges();
            return(1);
        }
Beispiel #2
0
        public bool UpdataAdmin(admin a)
        {
            helpsEntities helps = new helpsEntities();
//            string sql = "update  admin set password='******' where username='******'";
            admin admin = helps.admin.Where(c => c.username == a.username).FirstOrDefault();

            admin.password = a.password;
            if (helps.SaveChanges() > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }