コード例 #1
0
 public void InsertUser(UserT user)
 {
     new DacHelper(DbHelper, "intradb_write").Execute(
         CommandType.StoredProcedure,
          "dbo.UPAR_ASSETDB_User_Insert",
         SqlParameterHelper.CreateParameter("@LOGIN_ID", user.LoginId, SqlDbType.VarChar),
          SqlParameterHelper.CreateParameter("@INS_OPRT", user.InsertUser, SqlDbType.VarChar));
 }
コード例 #2
0
        public void InsertUser()
        {
            UserDac dac = new UserDac();
            UserT user = new UserT();

            string userLoginID = "testuser_" + new Random().Next(1000000, 9999999);
            user.LoginId = userLoginID;
            user.InsertUser = userLoginID;

            dac.InsertUser(user);

            UserT newUser = dac.SelectUserByLoginId(userLoginID);

            Assert.AreEqual(user.LoginId, newUser.LoginId);
        }
コード例 #3
0
        //
        // GET: /User/
        public ActionResult Index()
        {
            UserDac dac = new UserDac();
            UserT user = new UserT();

            string userLoginID = "testuser_" + new Random().Next(1000000, 9999999);
            user.LoginId = userLoginID;
            user.InsertUser = userLoginID;

            dac.InsertUser(user);

            return View();
        }