xml Write


   System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmLawDocSub));

 

 

 

"ORA-01401: 插入的值对于列过大/n"
"ORA-00001: 违反唯一约束条件 (MRCD.PK_TDCP_PROPERTYID)/n"
"ORA-02290: 违反检查约束条件 (MRCD.CK_CP_PROPERTYID)/n"

"ORA-01401: 插入的值对于列过大/n"

"ORA-01401: 插入的值对于列过大/n"

"ORA-02290: 违反检查约束条件 (MRCD.CK_IT_IDTYPEID)/n"

"ORA-02291: 违反完整约束条件 (MRCD.FK_TDVEHICLEFACTORY_COUNTRY) - 未找到父项关键字/n"
------------------------------------------------------------------------------------------
地市级系统金盾网数据同步程序参数设置-保存路径参数
机动车修理业治安管理信息系统地市级系统金盾网数据同步程序的正常运行,需要指定一个保存接收数据文件的路径:

机动车修理业治安管理信息系统地市级系统金盾网数据同步程序的的正常运行,需要连接Orale数据库取得同步数据,要使程序能够正常连接数据库,必须配置以下参数,大多数情况下应使用默认参数:
为保证机动车修理业治安管理信息系统地市级系统的正常运行,金盾网数据同步程序的参数设置程序的功能非常重要,建议设置必要的密码保护,以确保参数的正确:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
 <appSettings>
  <add key="MrcdPolice.GetAcceptInfo.AcceptInfo" value="http://www.ynfire.com/MRCDService/AcceptInfo.asmx"/>
  <add key="MrcdPolice.GetSysUser.Login" value="http://www.ynfire.com/MRCDService/Login.asmx"/>
  <add key="MrcdPolice.GetAlertInfo.AlertInfo" value="http://www.ynfire.com/MRCDService/AlertInfo.asmx"/>
  <add key="MrcdPolice.GetClewVehInfo.ClewEmp" value="http://www.ynfire.com/MRCDService/Clew.asmx"/>
  <add key="MrcdPolice.getCorpInfo.CorpInfo" value="http://www.ynfire.com/MRCDService/CorpInfo.asmx"/>
  <add key="MrcdPolice.GetDict.Dict" value="http://www.ynfire.com/MRCDService/Dict.asmx"/>
  <add key="MrcdPolice.GetSysManager.SysManager" value="http://www.ynfire.com/MRCDService/SysManager.asmx"/>
 </appSettings> 
</configuration>

----------------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<configuration>
 <appSettings>
  <add key="MrcdPolice.GetAcceptInfo.AcceptInfo" value="http://localhost/MrcdServer/AcceptInfo.asmx"/>
  <add key="MrcdPolice.GetSysUser.Login" value="http://localhost/MrcdServer/Login.asmx"/>
  <add key="MrcdPolice.GetAlertInfo.AlertInfo" value="http://localhost/MrcdServer/AlertInfo.asmx"/>
  <add key="MrcdPolice.GetClewVehInfo.ClewEmp" value="http://localhost/MrcdServer/Clew.asmx"/>
  <add key="MrcdPolice.getCorpInfo.CorpInfo" value="http://localhost/MrcdServer/CorpInfo.asmx"/>
  <add key="MrcdPolice.GetDict.Dict" value="http://localhost/MrcdServer/Dict.asmx"/>
  <add key="MrcdPolice.GetSysManager.SysManager" value="http://localhost/MrcdServer/SysManager.asmx"/>
 </appSettings> 
</configuration>
---------------------------------------------------------------
//  public bool WriteLog( string msg )
//  {  
//   try
//   {
//    #region 把日志写入数据库
//    int iFlag;
//    string OpenDatabase = "Server="+this.tbxServer.Text+";UID="+this.tbxUID.Text+";PWD="+this.tbxPwd.Text+";";
//    using ( OracleConnection Conn = new OracleConnection (OpenDatabase) )
//    {     
//     Conn.Open();
//     using ( OracleCommand Cmd = new OracleCommand() )
//     { 
//      Cmd.CommandText = "pro_InsertLog";
//      Cmd.CommandType = CommandType.StoredProcedure;
//     
//      Cmd.Parameters.Add("inOprUser",OracleType.VarChar,10);
//      Cmd.Parameters.Add("inOpeRate",OracleType.VarChar,40);
//      Cmd.Parameters.Add("inOprDate",OracleType.DateTime);
//      Cmd.Parameters.Add("inResult",OracleType.VarChar,80);
//      Cmd.Parameters.Add("outisright",OracleType.Number);
//
//      Cmd.Parameters["inOprUser"].Value ="xyx";
//      Cmd.Parameters["inOprDate"].Value = DateTime.Now;
//      Cmd.Parameters["inOpeRate"].Value ="配置基本参数";
//      Cmd.Parameters["inResult"].Value =msg;
//      Cmd.Parameters["outisright"].Direction = ParameterDirection.Output;
//      Cmd.Connection = Conn;
//      Cmd.ExecuteNonQuery();
//      iFlag = Int32.Parse(Cmd.Parameters["outisright"].Value.ToString());      
//      Cmd.Parameters.Clear();
//      Cmd.Dispose();        
//     }
//     Conn.Dispose();
//     Conn.Close();
//     if ( iFlag == 0 )
//      return true;
//     else
//      return false;
//    }
//    #endregion
//   }
//   catch(System.Exception)
//   {
//    return false;
//   }// end catch
//  }// end void 
//  #endregion
private void XMLModifyCorpInfo(string CorpCode,
string CorpName,string CorpAddr,string   PhoneNum,
string   Fax,string   PostCode,string   PracticeDate,
string   EconSort,string   FicPersonID,string   FicPerName,
string   Squire,string   OrderDepPhone,string   WorkRange,
string   EnrolCapital,string   Area,string   OrderDept,
string   SpeTrRecID,string   SpeTrRecDep,string   SpeTrRecDepName,
string   TrLicenseID,string   TrLicenseDep,string   BusiCharterID,
string   BCOrgan,string   TaxRecID,string   Revenue,string   Report)


(PunID,CorpCode,PunDate,PunPermID,PermDept,
PermPer, Executor,PunReason,PunSort,PunExtent, BePuner,IsRead);  

为保证机动车修理业治安管理信息系统地市级系统的正常运行,接收企业端上报数据程序的参数设置程序的功能非常重要,建议设置必要的密码保护,以确保参数的正确:
机动车修理业治安管理信息系统地市级系统接收企业端上报数据程序使用数据库用户验证企业端的连接是否合法,要使程序能够正常连接数据库,必须配置以下参数:
 Visual Studio  

正则表达式请参见
通配符 | 交互式搜索 | 使用结果列表搜索 | 渐进式搜索活动文档
正则表达式是查找和替换文本模式的简洁和灵活的表示法。Visual Studio 中使用的正则表达式是 Visual C++ 6.0 中使用的、具有简化语法的表达式的超集。

在“查找”、“在文件中查找”或“在文件中替换”对话框中,可使用下列正则表达式来改进和扩展搜索。

注意   在将下列任何表达式用作搜索条件的一部分之前,必须在“查找”、“在文件中查找”和“在文件中替换”对话框中选择“使用”复选框。
可使用下列表达式匹配搜索字符串中的字符或数字:

表达式 语法 说明
任一字符 . 匹配除换行符外的任何一个字符。
最多 0 项或更多 * 匹配前面表达式的 0 个或更多搜索项。
最多一项或更多 + 匹配前面表达式的至少一个搜索项。
最少 0 项或更多 @ 匹配前面表达式的 0 个或更多搜索项,匹配尽可能少的字符。
最少一项或更多 # 匹配前面表达式的一个或更多搜索项,匹配尽可能少的字符。
重复 n 次 ^n 匹配前面表达式的 n 个搜索项。例如,[0-9]^4 匹配任意 4 位数字的序列。
字符集 [] 匹配 [] 内的任何一个字符。要指定字符的范围,请列出由短划线 (-) 分隔的起始字符和结束字符,如 [a-z] 中所示。
不在字符集中的字符 [^...] 匹配跟在 ^ 之后的不在字符集中的任何字符。
行首 ^ 将匹配定位到行首。
行尾 $ 将匹配定位到行尾。
词首 < 仅当词在文本中的此位置开始时才匹配。
词尾 > 仅当词在文本中的此位置结束时才匹配。
分组 () 将子表达式分组。
或 | 匹配 OR 符号 (|) 之前或之后的表达式。). 最常用在分组中。例如,(sponge|mud) bath 匹配“sponge bath”和“mud bath”。
转义符 / 匹配跟在反斜杠 (/) 后的字符。这使您可以查找在正则表达式表示法中使用的字符,如 { 和 ^。例如,/^ 搜索 ^ 字符。
带标记的表达式 {} 标记括号内的表达式所匹配的文本。
第 n 个带标记的文本 /n 在“查找”或“替换”表达式中,指示第 n 个带标记的表达式所匹配的文本,其中 n 是从 1 至 9 的数字。
在“替换”表达式中,/0 插入整个匹配的文本。
 
右对齐字段 /(w,n) 在“替换”表达式中,将字段中第 n 个带标记的表达式右对齐至少 w 字符宽。
左对齐字段 /(-w,n) 在“替换”表达式中,将字段中第 n 个带标记的表达式左对齐至少 w 字符宽。
禁止匹配 ~(X) 当 X 出现在表达式中的此位置时禁止匹配。例如,real~(ity)    匹配“realty”和“really”中的“real”,而不匹配“reality”中的“real”。
字母数字字符 :a 匹配表达式
([a-zA-Z0-9])。
字母字符 :c 匹配表达式
([a-zA-Z])。
十进制数 :d 匹配表达式
([0-9])。
十六进制数 :h 匹配表达式
([0-9a-fA-F]+)。
标识符 :i 匹配表达式
([a-zA-Z_$][a-zA-Z0-9_$]*)。
有理数 :n 匹配表达式
(([0-9]+.[0-9]*)| ([0-9]*.[0-9]+)| ([0-9]+)).
带引号的字符串 :q 匹配表达式 (("[^"]*")| ('[^']*'))
字母字符串 :w 匹配表达式
([a-zA-Z]+)
十进制整数 :z 匹配表达式
([0-9]+)。
转义符 /e Unicode U+001B。
Bell /g Unicode U+0007。
退格符 /h Unicode U+0008。
换行符 /n 匹配与平台无关的换行符。在“替换”表达式中,插入换行符。
制表符 /t 匹配制表符,Unicode U+0009。
Unicode 字符 /x#### 或 /u#### 匹配 Unicode 值给定的字符,其中 #### 是十六进制数。可以用 ISO 10646 代码点或两个提供代理项对的值的 Unicode 代码点指定基本多语种平面(即一个代理项)外的字符。

下表列出按标准 Unicode 字符属性进行匹配的语法。两个字母的缩写词与 Unicode 字符属性数据库中所列的一样。可将这些指定为字符集的一部分。例如,表达式 [:Nd:Nl:No] 匹配任何种类的数字。

表达式 语法 说明
大写字母 :Lu 匹配任何一个大写字母。例如,:Luhe 匹配“The”但不匹配“the”。
小写字母 :Ll 匹配任何一个小写字母。例如,:Llhe 匹配“the”但不匹配“The”。
词首大写字母 :Lt 匹配将大写字母和小写字母结合的字符,例如,Nj 和 Dz。
修饰符字母 :Lm 匹配字母或标点符号,例如逗号、交叉重音符和双撇号,用于表示对前一字母的修饰。
其他字母 :Lo 匹配其他字母,如哥特体字母 ahsa。
十进制数 :Nd 匹配十进制数(如 0-9)和它们的双字节等效数。
字母数字 :Nl 匹配字母数字,例如罗马数字和表意数字零。
其他数字 :No 匹配其他数字,如旧斜体数字一。
开始标点符号 :Ps 匹配开始标点符号,例如左方括号和左大括号。
结束标点符号 :Pe 匹配结束标点符号,例如右方括号和右大括号。
左引号 :Pi 匹配左双引号。
右引号 :Pf 匹配单引号和右双引号。 
破折号 :Pd 匹配破折号标记。
连接符号 :Pc 匹配下划线标记。
其他标点符号 :Po 匹配逗号 (,)、?、"、!、@、#、%、&、*、/、冒号 (:)、分号 (;)、' 和 /。
空白分隔符 :Zs 匹配空白。
行分隔符 :Zl 匹配 Unicode 字符 U+2028。
段落分隔符 :Zp 匹配 Unicode 字符 U+2029。
无间隔标记 :Mn 匹配无间隔标记。
组合标记 :Mc 匹配组合标记。
封闭标记 :Me 匹配封闭标记。 
数学符号 :Sm 匹配 +、=、~、| 、< 和 >。
货币符号 :Sc 匹配 $ 和其他货币符号。
修饰符号 :Sk 匹配修饰符号,如抑扬音、抑音符号和长音符号。
其他符号 :So 匹配其他符号,如版权符号、段落标记和度数符号。
其他控制 :Cc 匹配行尾。
其他格式 :Cf 格式化控制字符,例如双向控制字符。
代理项 :Cs 匹配代理项对的一半。
其他私用 :Co 匹配私用区域的任何字符。
其他未分配的字符 :Cn 匹配未映射到 Unicode 字符的字符。

除标准 Unicode 字符属性外,还可以指定下列附加属性。可将这些属性指定为字符集的一部分。

表达式 语法 说明
Alpha :Al 匹配任何一个字符。例如,:Alhe 匹配“The”、“then”、“reached”等单词。
数字 :Nu 匹配任何一个数或数字。
标点符号 :Pu 匹配任何一个标点符号,如 ?、@、' 等等。
空白 :Wh 匹配所有类型的空格,包括印刷和表意文字的空格。
Bidi :Bi 匹配诸如阿拉伯文和希伯来文这类从右向左书写的字符。
朝鲜文 :Ha 匹配朝鲜文和组合朝鲜文字母。
平假名 :Hi 匹配平假名字符。
片假名 :Ka 匹配片假名字符。
表意文字/汉字/日文汉字 :Id 匹配表意文字字符,如汉字和日文汉字

请参见
通配符 | 交互式搜索 | 使用结果列表搜索 | 渐进式搜索活动文档

 

--------------------------------------------------------------------------------

 

 

 

 if( @UnitID is Not null )
    Begin 
          if(@DeptID is Not Null)
              Begin 
              Select DocumentID,t3.UnitName,(Select DocName from TD_DocumentType where DocumentTypeID =t1.DocumentTypeID) as DocumentType,DocumentNumber,DocMemo,CorrectionTime
                  from T_Document  t1 ,T_Check  t2,T_Unit t3 
                      Where ( t1.CheckID = t2.CheckID )  and (t3.UnitID=t2.UnitID) and  t2.UnitID = @UnitID   and  t3.DeptID = @DeptID 
                          and Cast(Convert(Varchar(10), CorrectionTime,120) as DateTime) >= Cast(Convert(Varchar(10), @Starttime,120) as DateTime)
                        and Cast(Convert(Varchar(10), CorrectionTime,120) as DateTime) <= Cast(Convert(Varchar(10), @Endtime,120) as DateTime) order by DocumentID DESC;
         End;
       else
       if(@DocumentTypeID is Not Null  and @DocumentNumber is Null)
      Begin 
      Select DocumentID,t3.UnitName,(Select DocName from TD_DocumentType where DocumentTypeID =t1.DocumentTypeID) as DocumentType,DocumentNumber,DocMemo,CorrectionTime
       from T_Document  t1 ,T_Check  t2,T_Unit t3 
        Where ( t1.CheckID = t2.CheckID )  and (t3.UnitID=t2.UnitID) and  t2.UnitID = @UnitID   and  t3.DeptID = @DeptID  and  t1.DocumentTypeID = @DocumentTypeID 
         and Cast(Convert(Varchar(10), CorrectionTime,120) as DateTime) >= Cast(Convert(Varchar(10), @Starttime,120) as DateTime)
          and Cast(Convert(Varchar(10), CorrectionTime,120) as DateTime) <= Cast(Convert(Varchar(10), @Endtime,120) as DateTime) order by DocumentID DESC;
      End;
        else
        if(@DocumentNumber is Not Null  and @DocumentTypeID is Null )
       Begin 
         Select DocumentID,t3.UnitName,(Select DocName from TD_DocumentType where DocumentTypeID =t1.DocumentTypeID) as DocumentType,DocumentNumber,DocMemo,CorrectionTime
        from T_Document  t1 ,T_Check  t2,T_Unit t3 
         Where ( t1.CheckID = t2.CheckID )  and (t3.UnitID=t2.UnitID) and  t2.UnitID = @UnitID   and  t3.DeptID = @DeptID  and   t1.DocumentNumber = @DocumentNumber 
          and Cast(Convert(Varchar(10), CorrectionTime,120) as DateTime) >= Cast(Convert(Varchar(10), @Starttime,120) as DateTime)
           and Cast(Convert(Varchar(10), CorrectionTime,120) as DateTime) <= Cast(Convert(Varchar(10), @Endtime,120) as DateTime) order by DocumentID DESC;
       End;
          else
                 if(@DocumentTypeID is Not Null and @DocumentNumber is Not Null )
            Begin 
            Select DocumentID,t3.UnitName,(Select DocName from TD_DocumentType where DocumentTypeID =t1.DocumentTypeID) as DocumentType,DocumentNumber,DocMemo,CorrectionTime
             from T_Document  t1 ,T_Check  t2,T_Unit t3 
              Where ( t1.CheckID = t2.CheckID )  and (t3.UnitID=t2.UnitID) and   t2.UnitID = @UnitID  and  t1.DocumentTypeID = @DocumentTypeID  and  t1.DocumentNumber = @DocumentNumber 
               and Cast(Convert(Varchar(10), CorrectionTime,120) as DateTime) >= Cast(Convert(Varchar(10), @Starttime,120) as DateTime)
                and Cast(Convert(Varchar(10), CorrectionTime,120) as DateTime) <= Cast(Convert(Varchar(10), @Endtime,120) as DateTime) order by DocumentID DESC;
            End;
                 else
           Begin 
            Select DocumentID,t3.UnitName,(Select DocName from TD_DocumentType where DocumentTypeID =t1.DocumentTypeID) as DocumentType,DocumentNumber,DocMemo,CorrectionTime from T_Document  t1 ,T_Check  t2,T_Unit t3
           Where ( t1.CheckID = t2.CheckID )  and (t3.UnitID=t2.UnitID) and   t2.UnitID = @UnitID 
             and Cast(Convert(Varchar(10), CorrectionTime,120) as DateTime) >= Cast(Convert(Varchar(10), @Starttime,120) as DateTime)
              and Cast(Convert(Varchar(10), CorrectionTime,120) as DateTime) <= Cast(Convert(Varchar(10), @Endtime,120) as DateTime) order by DocumentID DESC;
                          End;
          End;
          End; 
       End;
    End;
   else if( @DeptID is Not Null )
    Begin
     if(@DocumentTypeID is Not Null and @DocumentNumber is Null)
      Begin 
       Select DocumentID,t3.UnitName,(Select DocName from TD_DocumentType where DocumentTypeID =t1.DocumentTypeID) as DocumentType,DocumentNumber,DocMemo,CorrectionTime
        from T_Document  t1 ,T_Check  t2,T_Unit t3 
         Where ( t1.CheckID = t2.CheckID )  and (t3.UnitID=t2.UnitID) and   t3.DeptID = @DeptID    and  t1.DocumentTypeID = @DocumentTypeID 
          and Cast(Convert(Varchar(10), CorrectionTime,120) as DateTime) >= Cast(Convert(Varchar(10), @Starttime,120) as DateTime)
           and Cast(Convert(Varchar(10), CorrectionTime,120) as DateTime) <= Cast(Convert(Varchar(10), @Endtime,120) as DateTime) order by DocumentID DESC;
                  End;
     else
                if(@DocumentNumber is Not Null   and @DocumentTypeID is Null)
            Begin 
            Select DocumentID,t3.UnitName,(Select DocName from TD_DocumentType where DocumentTypeID =t1.DocumentTypeID) as DocumentType,DocumentNumber,DocMemo,CorrectionTime
             from T_Document  t1 ,T_Check  t2,T_Unit t3 
              Where ( t1.CheckID = t2.CheckID )  and (t3.UnitID=t2.UnitID) and   t3.DeptID = @DeptID  and   t1.DocumentNumber = @DocumentNumber 
               and Cast(Convert(Varchar(10), CorrectionTime,120) as DateTime) >= Cast(Convert(Varchar(10), @Starttime,120) as DateTime)
                and Cast(Convert(Varchar(10), CorrectionTime,120) as DateTime) <= Cast(Convert(Varchar(10), @Endtime,120) as DateTime) order by DocumentID DESC;
            End;
      else
         if(@DocumentTypeID is Not Null and @DocumentNumber is Not Null )
            Begin 
            Select DocumentID,t3.UnitName,(Select DocName from TD_DocumentType where DocumentTypeID =t1.DocumentTypeID) as DocumentType,DocumentNumber,DocMemo,CorrectionTime
             from T_Document  t1 ,T_Check  t2,T_Unit t3 
              Where ( t1.CheckID = t2.CheckID )  and (t3.UnitID=t2.UnitID) and   t3.DeptID = @DeptID  and  t1.DocumentTypeID = @DocumentTypeID  and  t1.DocumentNumber = @DocumentNumber 
               and Cast(Convert(Varchar(10), CorrectionTime,120) as DateTime) >= Cast(Convert(Varchar(10), @Starttime,120) as DateTime)
                and Cast(Convert(Varchar(10), CorrectionTime,120) as DateTime) <= Cast(Convert(Varchar(10), @Endtime,120) as DateTime) order by DocumentID DESC;
            End;
                 else
           Begin 
            Select DocumentID,t3.UnitName,(Select DocName from TD_DocumentType where DocumentTypeID =t1.DocumentTypeID) as DocumentType,DocumentNumber,DocMemo,CorrectionTime from T_Document  t1 ,T_Check  t2,T_Unit t3
           Where ( t1.CheckID = t2.CheckID )  and (t3.UnitID=t2.UnitID) and  t3.DeptID = @DeptID 
             and Cast(Convert(Varchar(10), CorrectionTime,120) as DateTime) >= Cast(Convert(Varchar(10), @Starttime,120) as DateTime)
              and Cast(Convert(Varchar(10), CorrectionTime,120) as DateTime) <= Cast(Convert(Varchar(10), @Endtime,120) as DateTime) order by DocumentID DESC;
                          End;
      End;
     End; 
    End;
   else if( @DocumentTypeID is Not Null and @DocumentNumber is Null )
         Begin
          Select DocumentID,t3.UnitName,(Select DocName from TD_DocumentType where DocumentTypeID =t1.DocumentTypeID) as DocumentType,DocumentNumber,DocMemo,CorrectionTime from T_Document  t1 ,T_Check  t2,T_Unit t3
           Where ( t1.CheckID = t2.CheckID )  and (t3.UnitID=t2.UnitID) and  t1.DocumentTypeID = @DocumentTypeID 
             and Cast(Convert(Varchar(10), CorrectionTime,120) as DateTime) >= Cast(Convert(Varchar(10), @Starttime,120) as DateTime)
              and Cast(Convert(Varchar(10), CorrectionTime,120) as DateTime) <= Cast(Convert(Varchar(10), @Endtime,120) as DateTime) order by DocumentID DESC;
    End;
   else if( @DocumentNumber is Not Null and @DocumentTypeID is Null)
    Begin
     Select DocumentID,t3.UnitName,(Select DocName from TD_DocumentType where DocumentTypeID =t1.DocumentTypeID) as DocumentType,DocumentNumber,DocMemo,CorrectionTime from T_Document  t1 ,T_Check  t2,T_Unit t3
          Where ( t1.CheckID = t2.CheckID )  and (t3.UnitID=t2.UnitID) and  t1.DocumentNumber = @DocumentNumber 
                       and Cast(Convert(Varchar(10), CorrectionTime,120) as DateTime) >= Cast(Convert(Varchar(10), @Starttime,120) as DateTime)
                      and Cast(Convert(Varchar(10), CorrectionTime,120) as DateTime) <= Cast(Convert(Varchar(10), @Endtime,120) as DateTime) order by DocumentID DESC;
    End;
   else if( @DocumentTypeID is Not Null and @DocumentNumber is Not Null )
      Begin
     Select DocumentID,t3.UnitName,(Select DocName from TD_DocumentType where DocumentTypeID =t1.DocumentTypeID) as DocumentType,DocumentNumber,DocMemo,CorrectionTime from T_Document  t1 ,T_Check  t2,T_Unit t3
          Where ( t1.CheckID = t2.CheckID )  and (t3.UnitID=t2.UnitID) and  t1.DocumentTypeID = @DocumentTypeID  and  t1.DocumentNumber = @DocumentNumber 
                       and Cast(Convert(Varchar(10), CorrectionTime,120) as DateTime) >= Cast(Convert(Varchar(10), @Starttime,120) as DateTime)
                      and Cast(Convert(Varchar(10), CorrectionTime,120) as DateTime) <= Cast(Convert(Varchar(10), @Endtime,120) as DateTime) order by DocumentID DESC;
      End;
   else
      Begin
     Select DocumentID,t3.UnitName,(Select DocName from TD_DocumentType where DocumentTypeID =t1.DocumentTypeID) as DocumentType,DocumentNumber,DocMemo,CorrectionTime from T_Document  t1 ,T_Check  t2,T_Unit t3 
         Where ( t1.CheckID = t2.CheckID )  and (t3.UnitID=t2.UnitID) 
                       and Cast(Convert(Varchar(10), CorrectionTime,120) as DateTime) >= Cast(Convert(Varchar(10), @Starttime,120) as DateTime)
                      and Cast(Convert(Varchar(10), CorrectionTime,120) as DateTime) <= Cast(Convert(Varchar(10), @Endtime,120) as DateTime) order by DocumentID DESC;
      End;
   

  string path = ValidateUser.GetSavePath();
   if( !Directory.Exists(path) )
   {
    Directory.CreateDirectory(path);
   }// end if
  
   string [] s = Directory.GetFileSystemEntries(path);
   int i = s.Length;
   i++ ;
   string SysDate =System.DateTime.Now.ToString();
   string SysName = "AA"+"-"+SysDate.Replace("-","").Replace(" ","").Replace(":","")+i.ToString()+"-"+DictName;
   string XMLName = path + @"/"+SysName+".xml";
    
   
   XmlTextWriter  xml = new XmlTextWriter(XMLName,System.Text.Encoding.UTF8);
   xml.Formatting = Formatting.Indented;
   xml.WriteStartDocument( false );
   #region
   xml.WriteStartElement("JINDUNTBData");

   xml.WriteStartElement(DictName);

   xml.WriteStartElement("PreSymbol");
   xml.WriteString("JXTBZD");
   xml.WriteEndElement();

   xml.WriteStartElement("OperSym");
   xml.WriteString("1");
   xml.WriteEndElement();

   if(PrimaryValue != "" && PrimaryValue != null && DictA != "" && DictA != null && DictB != "" && DictB != null && DictC != "" && DictC != null)
   {
    xml.WriteStartElement(DictPrimary);
    xml.WriteString(PrimaryValue);
    xml.WriteEndElement();

    xml.WriteStartElement(ColumA);
    xml.WriteString(DictA);
    xml.WriteEndElement();

    xml.WriteStartElement(ColumB);
    xml.WriteString(DictB);
    xml.WriteEndElement();

    xml.WriteStartElement(ColumC);
    xml.WriteString(DictC);
    xml.WriteEndElement();
   }
   else
   {
    if(PrimaryValue != "" && PrimaryValue != null && DictA != "" && DictA != null && DictB != "" && DictB != null && DictC == "" )
    {
     xml.WriteStartElement(DictPrimary);
     xml.WriteString(PrimaryValue);
     xml.WriteEndElement();

     xml.WriteStartElement(ColumA);
     xml.WriteString(DictA);
     xml.WriteEndElement();

     xml.WriteStartElement(ColumB);
     xml.WriteString(DictB);
     xml.WriteEndElement();
    }//end if
    else
    {
     if(PrimaryValue != "" && PrimaryValue != null && DictA != "" && DictA != null && DictB == "" &&  DictC == "" )
     {
      xml.WriteStartElement(DictPrimary);
      xml.WriteString(PrimaryValue);
      xml.WriteEndElement();

      xml.WriteStartElement(ColumA);
      xml.WriteString(DictA);
      xml.WriteEndElement();
     }//end if 
     else
     {
      return;
     }// end else if
    }//end  else if
   }//end if
  
   xml.WriteEndElement();

   xml.WriteEndElement();
   #endregion
   xml.Flush();
   xml.Close();
  }// end void

 

 

 

 

 

"Execute requires the Command object to have a Transaction object when the Connection object assigned to the Command is in a pending local transaction.  The Transaction property of the Command has not been initialized. "

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值