Beispiel #1
0
        public String StringBuilder(String CompanyID)
        {
            String strOutput = String.Empty;

            CompanyDAL cpdal = new CompanyDAL(ConfigurationManager.ConnectionStrings["ConnStringDeltoneCRM"].ConnectionString);
            ContactDAL ctdal = new ContactDAL(ConfigurationManager.ConnectionStrings["ConnStringDeltoneCRM"].ConnectionString);
            OrderDAL   ordal = new OrderDAL(ConfigurationManager.ConnectionStrings["ConnStringDeltoneCRM"].ConnectionString);

            String CPName          = cpdal.getCompanyNameByID(CompanyID);
            String CTName          = ctdal.getContactByCompanyID(Int32.Parse(CompanyID));
            String CTNumber        = ctdal.getContactPhoneBasedOnCompanyID(CompanyID);
            String LastOrder       = ordal.getLastOrderDateBasedOnCompanyID(CompanyID);
            String LastSalesperson = ordal.getLastSalespersonBasedOnCompanyID(CompanyID);

            strOutput = CPName + "|" + CTName + "|" + CTNumber + "|" + LastSalesperson + "|" + LastOrder.Substring(0, 10);

            return(strOutput);
        }