zoukankan      html  css  js  c++  java
  • .net宏

            System.Int32 returnValue = default(System.Int32);
                
    if(tm!=null)
                {
    #if DEBUG
                    
    try
                    {
    #endif
                        
    object tempObj=SqlHelper.ExecuteScalar(tm.SqlTransaction, this.SqlStruct.CommandType, this.SqlStruct.CommandText, this.SqlStruct.SqlParameters);
                        
    if(tempObj!=null)
                            returnValue 
    = Convert.ToInt32(tempObj);
    #if DEBUG
                    }
                    
    catch (Exception err)
                    {
                        DataBaseLogArgs args 
    = new DataBaseLogArgs();
                        args.ExceptionDetails 
    = err.ToString();
                        args.CommandText 
    = this.SqlStruct.CommandText;
                        args.CommandType 
    = this.SqlStruct.CommandType;
                        args.DateTime 
    = DateTime.Now;
                        args.Command 
    = "ExecuteNonQuery";
                        args.LogType 
    = LogType.Error;
                        args.SqlParameter 
    = this.SqlStruct.SqlParameters;
                        Log.Log.WriteLog(args);
                        
    throw;
                    }
    #endif                  

                }
                
    else
                {
                    
    object tempObj=SqlHelper.ExecuteScalar(this.connectStringReadAndWrite, this.SqlStruct.CommandType, this.SqlStruct.CommandText, this.SqlStruct.SqlParameters);
                    
    if(tempObj!=null)
                        returnValue
    = Convert.ToInt32(tempObj);
                }

  • 相关阅读:
    C# 字符串转换值类型
    C#判断字符串为空
    c#转义字符
    python各种类型的转换
    mysql创建新用户及新用户不能本地登陆的问题
    数据探索的方法
    使用requests爬取猫眼电影TOP100榜单
    Python中的正则表达式教程
    Anaconda多版本Python管理以及TensorFlow版本的选择安装
    Xshell访问虚拟机内Linux
  • 原文地址:https://www.cnblogs.com/aaa6818162/p/1525545.html
Copyright © 2011-2022 走看看