Ejemplo n.º 1
0
    private bool DisposeLead(int nFileId, int nFolderId, string newLeadStatus, out string err)
    {
        string strResultInfo = string.Empty;

        err = string.Empty;
        int    oFolderId = LoansManager.CheckProspectFileFolderId(nFileId);
        string oName     = LoansManager.CheckProspectFileName(nFileId);

        ServiceManager sm = new ServiceManager();

        using (LP2ServiceClient client = sm.StartServiceClient())
        {
            DisposeLeadRequest req = new DisposeLeadRequest();
            req.FileId      = nFileId;
            req.NewFolderId = nFolderId;
            req.hdr         = new ReqHdr();
            req.hdr.UserId  = CurrUser.iUserID;
            req.LoanStatus  = newLeadStatus;
            req.StatusDate  = DateTime.Now;

            DisposeLeadResponse response = client.DisposeLead(req);
            if (response.hdr.Successful)
            {
                return(true);
            }

            // LPLog.LogMessage(LogType.Logerror, string.Format("Failed to dispose file:{0}", response.hdr.StatusInfo));
            //PageCommon.WriteJsEnd(this, response.hdr.StatusInfo);
            err = response.hdr.StatusInfo;
            return(false);
        }
    }