熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> .NET編程 >> 正文

連鎖中心配送系統:用戶信息的添加[4]

2022-06-13   來源: .NET編程 
    ——此文章摘自《ASPNET +SQL Server網絡應用系統開發案例精解》定價 特價 詳細>>

                       STcmdParametersAdd(new SqlParameter(@STNoAdminSqlDbTypeInt));
                       STcmdParameters[@STNickName]Value = STNickNameText;
                       STcmdParameters[@STDepID]Value = STDepNameSelectedItemValue;;
                       STcmdParameters[@STUserName]Value = STUserNameText;
                       STcmdParameters[@STUserPwd]Value = STUserNameText;
                       STcmdParameters[@STNoAdmin]Value = STNoAdminSelectedItemValue;
                       STcmdConnectionOpen();
                       try
                       {
                                //執行sql語句
                                STcmdExecuteNonQuery();
                                ResponseRedirect(STManagerLoginaspx);
                       }
                       catch(SqlException)
                       {
                                //提示添加失敗
                                ST_WarnText=添加失敗;
                                ST_WarnStyle[color]=red;
                       }
                       STcmdConnectionClose();
             }
    }
    //單擊取消按鈕所觸發的事件
    private void ST_cancel_Click(object sender SystemEventArgs e)
    {
             ResponseRedirect(AddUseraspx);
    }

[]  []  []  []  


From:http://tw.wingwit.com/Article/program/net/201311/15719.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.