示例#1
0
文件: Admin.cs 项目: lingling66/asp-
    public int admin_add()
    {
        SqlParameter [] para = new SqlParameter[4];
        para[0]           = new SqlParameter("@adminname", SqlDbType.VarChar, 20);
        para[0].Value     = adminname;
        para[1]           = new SqlParameter("@adminpassword", SqlDbType.VarChar, 40);
        para[1].Value     = adminpassword;
        para[2]           = new SqlParameter("@admin", SqlDbType.VarChar, 20);
        para[2].Value     = admin;
        para[3]           = new SqlParameter("@returnvalue", SqlDbType.Int);
        para[3].Direction = ParameterDirection.ReturnValue;

        dbconn.updata("admin_add", para);
        return((int)para[3].Value);
    }
示例#2
0
 public int users_add()
 {
     SqlParameter [] para = new SqlParameter[8];
     para[0]       = new SqlParameter("@useradmin", SqlDbType.VarChar, 20);
     para[0].Value = useradmin;
     para[1]       = new SqlParameter("@userpassword", SqlDbType.VarChar, 40);
     para[1].Value = userpassword;
     para[2]       = new SqlParameter("@username", SqlDbType.VarChar, 20);
     para[2].Value = username;
     para[3]       = new SqlParameter("@useremail", SqlDbType.VarChar, 30);
     para[3].Value = useremail;
     para[4]       = new SqlParameter("@usershengfen", SqlDbType.VarChar, 20);
     para[4].Value = usershengfen;
     para[5]       = new SqlParameter("@usertelphone", SqlDbType.VarChar, 15);
     para[5].Value = usertelphone;
     para[6]       = new SqlParameter("@usershouji", SqlDbType.VarChar, 15);
     para[6].Value = usershouji;
     para[7]       = new SqlParameter("@useraddress", SqlDbType.VarChar, 50);
     para[7].Value = useraddress;
     return(dbconn.updata("users_add", para));
 }
示例#3
0
    public void dingdan_add()
    {
        SqlParameter[] para = new SqlParameter[8];
        para[0]       = new SqlParameter("@useradmin", SqlDbType.VarChar, 20);
        para[0].Value = useradmin;
        para[1]       = new SqlParameter("@shangpingid", SqlDbType.Int);
        para[1].Value = shangpingid;
        para[2]       = new SqlParameter("@quantity", SqlDbType.Int);
        para[2].Value = quantity;
        para[3]       = new SqlParameter("@totalprice", SqlDbType.Decimal, 12);
        para[3].Value = totalprice;
        para[4]       = new SqlParameter("@username", SqlDbType.VarChar, 20);
        para[4].Value = username;
        para[5]       = new SqlParameter("@usertelphone", SqlDbType.VarChar, 15);
        para[5].Value = usertelphone;
        para[6]       = new SqlParameter("@useraddress", SqlDbType.VarChar, 50);
        para[6].Value = useraddress;
        para[7]       = new SqlParameter("@dingdanbeizhu", SqlDbType.VarChar, 50);
        para[7].Value = dingdanbeizhu;

        dbconn.updata("dingdan_add", para);
    }