Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            String strOutput = String.Empty;

            String OperatorName = String.Empty;
            String OperatorID   = Request.QueryString["repname"];

            OperatorName = logindal.getLoginNameFromID(OperatorID);
            List <String> AllAccountsByOwner = getAllCompaniesOwnedByOwner(OperatorID);

            foreach (String SingleCompanyID in AllAccountsByOwner)
            {
                strOutput = strOutput + OperatorName + "|";
                String CompanyName = companydal.getCompanyNameByID(SingleCompanyID);
                strOutput = strOutput + CompanyName + "|";
                String ContactID   = contactdal.getContactByCompanyBasedOnLastOrder(Int32.Parse(SingleCompanyID));
                String ContactName = contactdal.getContactFullNameBasedOnContactID(ContactID);
                strOutput = strOutput + ContactName + "|";
                String LastOrderDate = orderdal.getLastOrderDateForCompany(SingleCompanyID);
                strOutput = strOutput + LastOrderDate + "~";
            }

            int Length = strOutput.Length;

            if (Length != 0)
            {
                strOutput = strOutput.Substring(0, (Length - 1));
            }

            Response.Write(strOutput);
        }