public ActionResult AddEmployer(EmployerModel employer, FormCollection FormPost)
        {
            if (ModelState.IsValid)
            {
                string CountryId = FormPost["CountryName"];
                string HowId = FormPost["HowHear"];

                BLL.MdPassWord DESPassword = new BLL.MdPassWord();
                UserInfo EmployerInfo = new UserInfo();
                EmployerInfo.UserID = BLL.BaseUtility.GenerateGUID();
                EmployerInfo.FirstName = employer.FirstName;
                EmployerInfo.LastName = employer.LastName;
                EmployerInfo.Email = employer.Email;
                EmployerInfo.CompanyName = employer.CompanyName;
                EmployerInfo.CountryID = Convert.ToInt32(CountryId);
                EmployerInfo.UserName = employer.UserName;
                EmployerInfo.PassWord = DESPassword.Encrypt(employer.PassWord);
                EmployerInfo.How = Convert.ToInt32(HowId);
                EmployerInfo.Type = 0;

                DbEntities.UserInfo.AddObject(EmployerInfo);
                DbEntities.SaveChanges();

                Session["NewUser"] = EmployerInfo;

                return RedirectToAction("VerifyEmail", "Account");
            }

            return View();
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the UserInfo EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToUserInfo(UserInfo userInfo)
 {
     base.AddObject("UserInfo", userInfo);
 }
 /// <summary>
 /// Create a new UserInfo object.
 /// </summary>
 /// <param name="userID">Initial value of the UserID property.</param>
 /// <param name="firstName">Initial value of the FirstName property.</param>
 /// <param name="lastName">Initial value of the LastName property.</param>
 /// <param name="email">Initial value of the Email property.</param>
 /// <param name="passWord">Initial value of the PassWord property.</param>
 /// <param name="type">Initial value of the Type property.</param>
 public static UserInfo CreateUserInfo(global::System.String userID, global::System.String firstName, global::System.String lastName, global::System.String email, global::System.String passWord, global::System.Int32 type)
 {
     UserInfo userInfo = new UserInfo();
     userInfo.UserID = userID;
     userInfo.FirstName = firstName;
     userInfo.LastName = lastName;
     userInfo.Email = email;
     userInfo.PassWord = passWord;
     userInfo.Type = type;
     return userInfo;
 }
예제 #4
0
파일: ActiveRecord.cs 프로젝트: PoulXia/QT
 public static void Setup(int testItems)
 {
     SetTestRepo();
     for(int i=0;i<testItems;i++){
         UserInfo item=new UserInfo();
         _testRepo._items.Add(item);
     }
 }
예제 #5
0
파일: ActiveRecord.cs 프로젝트: PoulXia/QT
 public static void Setup(UserInfo item)
 {
     SetTestRepo();
     _testRepo._items.Add(item);
 }
        public ActionResult AddWorker(WorkerModel worker, FormCollection FormPost)
        {
            if (ModelState.IsValid)
            {
                string CountryId = FormPost["CountryName"];
                string HowId = FormPost["HowHear"];
                string AccountType = FormPost["AccountType"];

                BLL.MdPassWord DESPassword = new BLL.MdPassWord();
                UserInfo WorkerInfo = new UserInfo();
                WorkerInfo.UserID = BLL.BaseUtility.GenerateGUID();
                WorkerInfo.FirstName = worker.FirstName;
                WorkerInfo.LastName = worker.LastName;
                WorkerInfo.Email = worker.Email;
                WorkerInfo.CountryID = Convert.ToInt32(CountryId);
                WorkerInfo.UserName = worker.UserName;
                WorkerInfo.PassWord = DESPassword.Encrypt(worker.PassWord);
                WorkerInfo.How = Convert.ToInt32(HowId);
                WorkerInfo.AccountType = Convert.ToInt32(AccountType);
                WorkerInfo.DisplayName = worker.DisplayName;
                WorkerInfo.Type = 1;

                DbEntities.UserInfo.AddObject(WorkerInfo);
                DbEntities.SaveChanges();

                Session["NewUser"] = WorkerInfo;

                return RedirectToAction("WantJob", "Account");
            }

            return View();
        }
예제 #7
0
파일: CarDal.cs 프로젝트: yyh1024/zuCar
        //个人认证
        public int AddUserInfo(UserInfo u)
        {
            string str = $"insert into UserInfo values({u.uid},'{u.UName}','{u.IDcard}')";

            return(DBHelper.ExecuteNonQuery(str));
        }
예제 #8
0
 public DataTable LonginDAL(UserInfo u)
 {
     return(new DBhelper().Get(string.Format("select * from UserInfo where LoginName='{0}' and Password='******'", u.LoginName, u.Password)));
 }