public ActionResult get_IPBill_PT_Information(long billno)
        {
            IPBillCorrectionDB _DB = new IPBillCorrectionDB();
            IPBillInfo         _RE = _DB.get_IPBill_PT_Information(billno);
            var serializer         = new JavaScriptSerializer {
                MaxJsonLength = Int32.MaxValue
            };
            var result = new ContentResult
            {
                Content     = serializer.Serialize(new { Res = _RE ?? new IPBillInfo(), rcode = _DB.ret, rmsg = _DB.retmsg }),
                ContentType = "application/json"
            };

            return(result);
        }
コード例 #2
0
 public IPBillInfo get_IPBill_PT_Information(long billno)
 {
     try
     {
         DB.param = new SqlParameter[] {
             new SqlParameter("@billno", billno),
             new SqlParameter("@retcode", SqlDbType.Int),
             new SqlParameter("@retmsgs", SqlDbType.VarChar, 500)
         };
         DB.param[1].Direction = ParameterDirection.Output;
         DB.param[2].Direction = ParameterDirection.Output;
         IPBillInfo DD = DB
                         .ExecuteSPAndReturnDataTable("aripbilling.get_ipbill_info")
                         .DataTableToList <IPBillInfo>().FirstOrDefault();
         this.ret    = int.Parse(DB.param[1].Value.ToString());
         this.retmsg = DB.param[2].Value.ToString();
         return(DD);
     }
     catch (Exception ex)
     {
         eLOG.LogError(ex);
         throw new ApplicationException("Error Message:</b> <br /> " + ex.Message + "<br /><br /><b>Stack Trace:</b><br /> " + ex.StackTrace);
     }
 }