在C#.NET中,@ WebParam等效于什么?

时间:2018-07-30 18:25:27

标签: java c# asp.net web-services

我对c#.net还是很陌生,应该将项目从java转换为c#,所以在尝试转换这2种方法时遇到了麻烦(第一种方法记录了日期,即所谓的“交易发生时”,并调用具有所有逻辑的第二种方法),但问题是第二种方法的参数是WebParam,我在c#中找不到与之等效的东西(我尝试查找它,但仍然不明白),希望有人可以指出我朝着正确的方向前进,谢谢你。

第一种方法:

    public String writeStudentPayment(String st_no, String depositID, double requiredAmount, double depositAmount,
                                  String RegYear, String RegSmst, String accountID, String BankID, String BranchID //,                                                
                                            //@WebParam(name = "Branch_User_Name") String branch_userName,
                                            //@WebParam(name = "Branch_Password") String branch_pwd
                                         )
{
        Date d=new Date(System.currentTimeMillis());
        DateFormat frmt=new SimpleDateFormat("dd-MM-yyyy");
        String  strDate=frmt.format(d);
        return writeStudentPayment(BankID, BranchID, depositID, requiredAmount, depositAmount, strDate, accountID, st_no,RegYear,RegSmst); //,branch_userName, branch_pwd);
}

第二种方法:

    @WebMethod(exclude = true)
private String writeStudentPayment(   
                                            @WebParam(name = "Bank_ID") String bankID,
                                            @WebParam(name = "Branch_ID") String BranchID,
                                            @WebParam(name = "Deposit_ID") String depositID,
                                            @WebParam(name = "Required_Amount") double requiredAmount,
                                            @WebParam(name = "Deposit_Amount") double depositAmount,
                                            @WebParam(name = "Deposit_Date") String depositDate,
                                            @WebParam(name = "Account_ID") String accountID,
                                            @WebParam(name = "BAU_ST_NO") String st_no,
                                            @WebParam(name = "Reg_Year") String RegYear,
                                            @WebParam(name = "Reg_Smst") String RegSmst //,
                                            //@WebParam(name = "Branch_User_Name") String branch_userName,
                                            //@WebParam(name = "Branch_Password") String branch_pwd
                                  )
{ // the rest of code.................}

0 个答案:

没有答案