예제 #1
0
    public void GetClientRevenueDetails(String clientMnemonic)
    {
        DataTable clientData = null;

        if (clientMnemonic.Length > 0)
        {
            clientData = DL_Client.getClientDetailsByMnemonic(clientMnemonic);
        }
        if (clientData == null)
        {
            this.IsValid = false;
        }
        else if (clientData.Rows.Count < 1)
        {
            this.IsValid = false;
        }
        else if (clientData.Rows.Count > 1)
        {
            this.IsValid = false;
        }
        else
        {
            this.IsValid = true;

            if (clientData.Rows[0]["ClientIsHot"].ToString().ToUpper() == "Y")
            {
                this._isHot = true;
            }
            else
            {
                this._isHot = false;
            }
            if (clientData.Rows[0]["ClientIsAllied"].ToString().ToUpper() == "Y")
            {
                this._isAllied = true;
            }
            else
            {
                this._isAllied = false;
            }
            this._isNew = (clientData.Rows[0]["ClientIsNew"].ToString().ToUpper() == "Y");
            string[] arrClientRevenue = clientData.Rows[0]["ClientRevenue"].ToString().Split('^');
            this._revenueFirstMonth  = (arrClientRevenue[0].Length == 0 ? "0" : arrClientRevenue[0]);
            this._revenueSecondMonth = (arrClientRevenue[1].Length == 0 ? "0" : arrClientRevenue[1]);
            this._revenueThirdMonth  = (arrClientRevenue[2].Length == 0 ? "0" : arrClientRevenue[2]);
        }
    }
예제 #2
0
    /// <summary>
    /// Client Mnemonic is the rowID, so it's fesiable to fetch client
    /// details based on mnemonic where mnemonic is available.
    /// </summary>
    /// <param name="clientMnemonic">Client Mnemonic</param>
    public void GetClientDetailsByMnemonic(String clientMnemonic)
    {
        DataTable clientData = null;

        if (clientMnemonic.Length > 0)
        {
            clientData = DL_Client.getClientDetailsByMnemonic(clientMnemonic);
        }
        if (clientData == null)
        {
            this.IsValid = false;
        }
        else if (clientData.Rows.Count < 1)
        {
            this.IsValid = false;
        }
        else if (clientData.Rows.Count > 1)
        {
            this.IsValid = false;
        }
        else
        {
            this.IsValid          = true;
            this.NoOfRecentIssues = 5;

            DataRow dr = clientData.Rows[0];
            this._ID                     = dr["CLF_CLNUM"].ToString();
            this._name                   = dr["CLF_CLNAM"].ToString();
            this._mnemonic               = dr["CLF_CLMNE"].ToString();
            this._phoneNumber            = dr["CLF_CLPHN"].ToString();
            this._address.Address1       = dr["CLF_CLAD1"].ToString();
            this._address.Address2       = dr["CLF_CLAD2"].ToString();
            this._address.Address3       = dr["CLF_CLAD3"].ToString();
            this._address.Address4       = dr["CLF_CLAD4"].ToString();
            this._salesTerritory         = dr["CLF_CLTER"].ToString();
            this._salesRepresentative    = dr["SALES_REP"].ToString();
            this._autodialGroups         = dr["AutoDial_Group"].ToString();
            this._zoasisNumber           = dr["ZOASIS_NUMBER"].ToString();
            this._routeStop              = dr["CLF_CLRTS"].ToString();
            this._location               = dr["LOCATION"].ToString();
            this._alphaName              = dr["CLF_CLANAM"].ToString();
            this._sortKey                = dr["CLF_CLSRT"].ToString();
            this._afterHours             = dr["CLF_CLAPH"].ToString();
            this._fax                    = dr["CLF_CLFAX"].ToString();
            this._ofcContact             = dr["CLF_CLCON"].ToString();
            this._description            = dr["CLF_CLTYP"].ToString();
            this._reportingPartials      = dr["CLF_PART"].ToString();
            this._reportMicroPartials    = dr["CLF_PMB"].ToString();
            this._comprehensiveFinals    = dr["CLF_PCOMP"].ToString();
            this._customUnitCodes        = dr["CustomUnitCode"].ToString();
            this._orderEntryFlashMessage = dr["CLF_FLASH"].ToString();
            this._orderEntryInstruction  = dr["OEMOEMSG"].ToString();
            //this._region = dr["Region"].ToString();
            this._salesRepExtension = dr["SalesRepExt"].ToString();
            this._salesRepEmail     = dr["SalesRepEmail"].ToString();
            //+SSM 02/11/2011 #Issue115785 Migrating SalesRep and RelatedChanges
            this._salesRepCellPh             = dr["SalesRepCellPh"].ToString();
            this._salesLastModified          = dr["LastUpdated"].ToString();
            this._salesTerritoryMgr          = dr["SalesRepMgrName"].ToString();
            this._salesTerritoryMgrCellPh    = dr["SalesRepMgrCellPh"].ToString();
            this._salesTerritoryMgrEmail     = dr["SalesRepMgrEmail"].ToString();
            this._salesTerritoryMgrExtension = dr["SalesRepMgrExt"].ToString();
            //-SSM
            this._accountNotes = dr["AccountNotes"].ToString();
            if (dr["ClientIsHot"].ToString().ToUpper() == "Y")
            {
                this._isHot = true;
            }
            else
            {
                this._isHot = false;
            }
            if (dr["ClientIsAllied"].ToString().ToUpper() == "Y")
            {
                this._isAllied = true;
            }
            else
            {
                this._isAllied = false;
            }
            this._isNew = (dr["ClientIsNew"].ToString().ToUpper() == "Y");
            string[] arrClientRevenue = dr["ClientRevenue"].ToString().Split('^');
            this._revenueFirstMonth  = (arrClientRevenue[0].Length == 0 ? "0" : arrClientRevenue[0]);
            this._revenueSecondMonth = (arrClientRevenue[1].Length == 0 ? "0" : arrClientRevenue[1]);
            this._revenueThirdMonth  = (arrClientRevenue[2].Length == 0 ? "0" : arrClientRevenue[2]);
            this._inquiryMessages    = dr["InquiryMessages"].ToString();
            //this._country = dr["Country"].ToString();
            String country;
            getClientCountry(this.ID, out country);
            this._country = country;
        }
    }