⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 anclistbase.h

📁 科思ERP部分源码及控件
💻 H
字号:
#ifndef AncListBaseH
#define AncListBaseH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>

#include "BaseGlobeVars.h"
#include "KSFunction.h"
#include "CommFunction.h"
#include "WhereForm.h"
#include "FormSet.h"
#include "WnQuery.h"
#include "container.h"
#include "ClientDcom.h"
#define WM_UPDATE_MSG (WM_USER+1)
//---------------------------------------------------------------------------
class TAncListBaseForm : public TForm
{
__published:	// IDE-managed Components
    void __fastcall FormClose(TObject *Sender, TCloseAction &Action);

protected:
      //this variable indicate the current state of form
      TControlAction CurState;
      bool IsCreate;
      bool IsParentComServer;//如果是从父窗体传入的数据集,则comserver不在析构里删除
public:
     TControlGroups *ClientGroup;
     TComServer *comServer;

protected:
      int __fastcall ShowMessageWindow(AnsiString Msg,TMessageWindowStyle mStyle);
      DYNAMIC void __fastcall MiddleForm();

      // this function Show FindWindow let user select or browse records
      // in a windows Named "FindWindow" .
      // the parameter is browseno which stored in SDEdit's property BrowseNo
      // the return value is AnsiString value.
      DYNAMIC void __fastcall ShowFindWindow(AnsiString BrowseNo);
      DYNAMIC void __fastcall ExitThisForm();

       virtual void __fastcall InitEditControl();
      // this function clear all the control in TControlGroups or
      // User Specify if the parameter BringToNext is true,it does
      // not clear the control else clear it.
//      virtual void __fastcall ClearControl(int Section,bool BringToNext)=0;
      virtual void __fastcall GetDataFromComObject(int Section);
      virtual void __fastcall SendDataToComObject(int Section);
      virtual void __fastcall WaitUserInput(int Section);
//      virtual void __fastcall RefreshGridData(int mAction);
      virtual void __fastcall DisplayBill();
      virtual void __fastcall GetBill(AnsiString BillID);
      virtual void __fastcall ChangeToBrowseState(bool Browse=false);

      __property TControlAction CurrentState={read=CurState};
private:
        AnsiString FBillNumID;
        void __fastcall SetBillNumID(AnsiString value);
        AnsiString __fastcall GetBillNumID();
        TComResultSet *__fastcall GetQuery();
        void __fastcall ResolveRight(TMessage &message);

public:		// User declarations
        __fastcall TAncListBaseForm(TComponent* Owner);
        __fastcall TAncListBaseForm(TComponent* Owner,HWND chWnd,AnsiString MidCode,AnsiString WhereStr);
        __fastcall ~TAncListBaseForm();
        __property AnsiString BillNumID  = { read=GetBillNumID, write=SetBillNumID };

protected:
  void virtual __fastcall UpdateMessage(TMessage Message);
  void virtual __fastcall RefreshUpdateData(int MsgSrc,int MsgType);
  virtual void __fastcall SetFormRight(AnsiString right); // /* TODO : 需要重载 */
public:
  TComResultSet *g_sdRsGlkm;
    TKSSet *l_RsGoods; //anc
    TKSSet *l_RsSupply;
    TKSSet *l_RsClient;
  TComResultSet *l_Query; //anc
  AnsiString __fastcall GetHeadValue(AnsiString fieldname);
  void __fastcall SetHeadValue(AnsiString fieldname,Variant value);
  AnsiString __fastcall GetDetailValue(AnsiString fieldname);
  void __fastcall SetDetailValue(AnsiString fieldname,Variant value);

//------------------------------------------------------------
    AnsiString __fastcall GetGlkmValue(TGetValueType GetValueType,AnsiString mFieldName);
    AnsiString __fastcall GetGoodsValue(TGetValueType GetValueType,AnsiString mFieldName);//GetValueType枚举变量:{gtInitRs,gtOpenForm}
    AnsiString __fastcall GetSupplyValue(TGetValueType GetValueType,AnsiString mFieldName);
    AnsiString __fastcall GetClientValue(TGetValueType GetValueType,AnsiString mFieldName);

    bool __fastcall InitRsGlkm(AnsiString L_GlkmCode);
    bool __fastcall InitRsGoods(AnsiString L_goodsCode);
    bool __fastcall InitRsSupply(AnsiString L_SupplysCode);
    bool __fastcall InitRsClient(AnsiString L_ClientsCode) ;

    bool __fastcall OpenGoodsForm(AnsiString WhereStr);
    bool __fastcall OpenSupplyForm(AnsiString WhereStr);
    bool __fastcall OpenClientForm(AnsiString WhereStr);
    bool __fastcall OpenGlkmForm(bool IsOnlyDetail=true) ;//不带条件的查询。IsOnlyDetail,是否只能返回明细科目,default=ture;
//------------------------------------------------------------

  __property TComResultSet *Query={read=GetQuery};

BEGIN_MESSAGE_MAP
    MESSAGE_HANDLER(WM_UPDATE_MSG, TMessage, UpdateMessage);
    MESSAGE_HANDLER(WM_FORMRIGHT_MSG,TMessage,ResolveRight );
END_MESSAGE_MAP(TForm)

};
//---------------------------------------------------------------------------
extern PACKAGE TAncListBaseForm *AncListBaseForm;
//---------------------------------------------------------------------------
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -