Wednesday, February 12, 2020

Get NAME From DirPerson : Join tables are DirPerson, HcmWorker and CustTable

public void insert()
{
    DirPerson               dirPerson;
    HcmWorker               hcmWorker;
    CustTable               custTableLoc; 
 
    if(!this.TDC_DiggingCoordinator)
    {
       select Name from dirPerson
                      join hcmWorker
                          where hcmWorker.Person == dirPerson.RecId
                      join custTableLoc
                          where custTableLoc.AccountNum == this.CustAccount &&
                                  custTableLoc.DiggingCoordinator == hcmWorker.RecId;

       this.TDC_DiggingCoordinator  =  dirPerson.Name;
    }

Display method : ProdTable : get user user name based on UserId

public Display TDC_CreatedBy getUserName()
{
    TDC_CreatedBy        nameLoc;
    UserInfo             userInfoLoc;

    select Name from userInfoLoc
                    where userInfoLoc.Id == this.createdBy;

    nameLoc     =      userInfoLoc.name;
    return nameLoc;
}

Get the record from ProjTable and insert into ProdTable with the help of init()

public void initFromProjTable(ProjTable  _projTable)
{
    this.ProjId = _projTable.ProjId;

    if (this.isProjMethodFinished() || this.isProjMethodConsumed())
    {
        ProjInventJournalTransMapForm::construct(this).initFromProjTable(_projTable);
    }

    // NC 2015 05 14 - requested by SVBAN
    this.ProdSortingId      = _projTable.sortingId;
    this.ProdSortingId[1]   = "";
    this.Name               = _projTable.name;

    //TDC_JIRASYSCADY-573
    if (!this.TDC_DiggingCoordinator)
    {
        this.TDC_DiggingCoordinator = _projTable.TDC_DiggingCoordinator;
    }
    //TDC_JIRASYSCADY-573
}

Get Name from DirPerson: ProdTable.TDC_DiggingCoordinator

public void insert()
{
    DirPerson               dirPerson;
    HcmWorker               hcmWorker;
    CustTable               custTableLoc;   

    //TDC_JIRASYSCADY-573
    if(!this.TDC_DiggingCoordinator)
    {
       select Name from dirPerson
                      join hcmWorker
                          where hcmWorker.Person == dirPerson.RecId
                      join custTableLoc
                          where custTableLoc.AccountNum == this.CustAccount &&
                                  custTableLoc.DiggingCoordinator == hcmWorker.RecId;

       this.TDC_DiggingCoordinator  =  dirPerson.Name;
    }
    //TDC_JIRASYSCADY-573
}

Command for stop the service

sc queryex <servicename>
taskkill /f /pid <PID>

Command for clear the cache in server

del "%USERPROFILE%\AppData\Local\ax*.kti"
del "%USERPROFILE%\AppData\Local\ax*.auc