zoukankan      html  css  js  c++  java
  • 简单的函数


    Function UpdateOrInsert(Fbentityid,Itemid,CNTRID:integer):boolean;
      
    var aSQLQuery: TSQLQuery;
    begin
        Result:
    =True;
        aSQLQuery:
    =TSqlquery.create(nil);
        
    with aSQLQuery do try
          Close;SQL.Clear;
          SQLConnection:
    =SQLConn;
          sql.Add(
    'select count(*) from PRICEMNGITEMS ');
          sql.Add(
    'where Sysid=:Sysid  and Entityid=:Entityid and itemid=:itemid and CNTRID=:CNTRID');
          ParamByName(
    'Sysid').asInteger:=FSysid;
          ParamByName(
    'Entityid').asInteger:=FBEntityID;
          ParamByName(
    'Itemid').asInteger:=Itemid;
          ParamByName(
    'CNTRID').asInteger:=CNTRID;
          Open;
            
    if (not IsEmpty) and (FieldByName('Count').AsInteger>0then
            
    begin
             Result:
    =False;
             exit;
          
    end;
        
    finally
          free;
        
    end;
    end
  • 相关阅读:
    makefile学习之路
    DiagramDesigner的学习心得一
    MvvmLight的Message使用
    MvvmLight学习心得三
    Nancy学习心得一
    WPF的类似WinForm中的托盘
    py学习记录#10
    PY期末习题全解析
    py学习记录#11
    PY学习记录#9
  • 原文地址:https://www.cnblogs.com/CNQCJ/p/1358436.html
Copyright © 2011-2022 走看看