Example #1
0
    private string getStoreDetailString(StoreDataset storeDS)
    {
        //Return a string of store detail
        StringBuilder detail = new StringBuilder();

        try {
            if (storeDS.StoreTable.Rows.Count > 0)
            {
                StoreDataset.StoreTableRow store = storeDS.StoreTable[0];
                detail.AppendLine(store.StoreName.Trim() + " (store #" + store.StoreNumber.ToString() + "; substore #" + store.SubStoreNumber.Trim() + ")");
                detail.AppendLine((!store.IsStoreAddressline1Null() ? store.StoreAddressline1.Trim() : ""));
                detail.AppendLine((!store.IsStoreAddressline2Null() ? store.StoreAddressline2.Trim() : ""));
                detail.AppendLine((!store.IsStoreCityNull() ? store.StoreCity.Trim() : "") + ", " +
                                  (!store.IsStoreStateNull() ? store.StoreState.Trim() : "") + " " +
                                  (!store.IsStoreZipNull() ? store.StoreZip.Trim() : ""));
                detail.AppendLine((!store.IsContactNameNull() ? store.ContactName.Trim() : "") + ", " + (!store.IsPhoneNumberNull() ? store.PhoneNumber.Trim() : ""));
                detail.AppendLine((!store.IsRegionDescriptionNull() ? store.RegionDescription.Trim() : "") +
                                  " (" + (!store.IsRegionNull() ? store.Region.Trim() : "") + "), " +
                                  (!store.IsDistrictNameNull() ? store.DistrictName.Trim() : "") +
                                  " (" + (!store.IsDistrictNull() ? store.District.Trim() : "") + ")");
                detail.AppendLine("Zone " + (!store.IsZoneNull() ? store.Zone.Trim() : "") + ", " +
                                  "Agent " + (!store.IsAgentNumberNull() ? store.AgentNumber.Trim() : "") + " " +
                                  (!store.IsAgentNameNull() ? store.AgentName.Trim() : ""));
                detail.AppendLine("Window " + (!store.IsWindowTimeStartNull() ? store.WindowTimeStart.ToString("HH:mm") : "") + " - " +
                                  (!store.IsWindowTimeEndNull() ? store.WindowTimeEnd.ToString("HH:mm") : "") + ", " +
                                  "Del Days " + getDeliveryDays(store) + ", " +
                                  (!store.IsScanStatusDescrptionNull() ? store.ScanStatusDescrption.Trim() : ""));
                detail.AppendLine("JA Transit " + (!store.IsStandardTransitNull() ? store.StandardTransit.ToString() : "") + ", " + "OFD " + getOFD(store));
                detail.AppendLine("Special Inst: " + (!store.IsSpecialInstructionsNull() ? store.SpecialInstructions.Trim() : ""));
            }
        }
        catch (Exception ex) { Master.ReportError(ex); }
        return(detail.ToString());
    }
Example #2
0
    private string getOFD(StoreDataset.StoreTableRow store)
    {
        //Return delivery days from the dataset
        string ofd = "";

        try {
            //OFD1, OFD2, or NONE
            if (!store.IsIsOutforDeliveryDay1Null())
            {
                ofd += (store.IsOutforDeliveryDay1.Trim() == "Y" ? "DAY1" : "");
            }
            else if (!store.IsIsOutforDeliveryDay2Null())
            {
                ofd += (store.IsOutforDeliveryDay2.Trim() == "Y" ? "DAY2" : "");
            }
            else
            {
                ofd += "";
            }
        }
        catch (Exception ex) { Master.ReportError(ex); }
        return(ofd);
    }
Example #3
0
    private string getDeliveryDays(StoreDataset.StoreTableRow store)
    {
        //Return delivery days from the dataset
        string ddays = "";

        try {
            //Check for overrides
            if (!store.IsIsDeliveryDayMondayNull())
            {
                ddays += (store.IsDeliveryDayMonday.Trim() == "Y" ? "M" : "");
            }
            if (!store.IsIsDeliveryDayTuesdayNull())
            {
                ddays += (store.IsDeliveryDayTuesday.Trim() == "Y" ? "T" : "");
            }
            if (!store.IsIsDeliveryDayWednesdayNull())
            {
                ddays += (store.IsDeliveryDayWednesday.Trim() == "Y" ? "W" : "");
            }
            if (!store.IsIsDeliveryDayThursdayNull())
            {
                ddays += (store.IsDeliveryDayThursday.Trim() == "Y" ? "R" : "");
            }
            if (!store.IsIsDeliveryDayFridayNull())
            {
                ddays += (store.IsDeliveryDayFriday.Trim() == "Y" ? "F" : "");
            }

            //If no overrides, then all days are valid
            if (ddays.Trim().Length == 0)
            {
                ddays = "MTWRF";
            }
        }
        catch (Exception ex) { Master.ReportError(ex); }
        return(ddays);
    }