RajenderMakhija
Programmer
I have taken below mention code from this site which was posted by Jay. I want to know which accpac dll file will be added as references C# project and how to link this code to particular company.
public void SignOnCompany2()
{
AccpacCOMAPI.AccpacSession pSession;
AccpacSignonManager.AccpacSignonMgr pSignon;
AccpacCOMAPI.AccpacDBLink pDBLinkCmpRW;
AccpacCOMAPI.AccpacDBLink pDBLinkSysRW;
pSession = new AccpacCOMAPI.AccpacSessionClass();
pSignon = new AccpacSignonManager.AccpacSignonMgrClass();
pSession.Init ("","CS","CS0001", "53A");
pSignon.SignonNewSession (pSession);
if (pSession.IsOpened)
{ pDBLinkCmpRW = pSession.OpenDBLink
(AccpacCOMAPI.tagDBLinkTypeEnum.DBLINK_COMPANY,
AccpacCOMAPI.tagDBLinkFlagsEnum.DBLINK_FLG_READWRITE);
pDBLinkSysRW = pSession.OpenDBLink
(AccpacCOMAPI.tagDBLinkTypeEnum.DBLINK_SYSTEM,
AccpacCOMAPI.tagDBLinkFlagsEnum.DBLINK_FLG_READWRITE);
}
}
public void SignOnCompany2()
{
AccpacCOMAPI.AccpacSession pSession;
AccpacSignonManager.AccpacSignonMgr pSignon;
AccpacCOMAPI.AccpacDBLink pDBLinkCmpRW;
AccpacCOMAPI.AccpacDBLink pDBLinkSysRW;
pSession = new AccpacCOMAPI.AccpacSessionClass();
pSignon = new AccpacSignonManager.AccpacSignonMgrClass();
pSession.Init ("","CS","CS0001", "53A");
pSignon.SignonNewSession (pSession);
if (pSession.IsOpened)
{ pDBLinkCmpRW = pSession.OpenDBLink
(AccpacCOMAPI.tagDBLinkTypeEnum.DBLINK_COMPANY,
AccpacCOMAPI.tagDBLinkFlagsEnum.DBLINK_FLG_READWRITE);
pDBLinkSysRW = pSession.OpenDBLink
(AccpacCOMAPI.tagDBLinkTypeEnum.DBLINK_SYSTEM,
AccpacCOMAPI.tagDBLinkFlagsEnum.DBLINK_FLG_READWRITE);
}
}