private string getStoreDetailString() { //Return a string of store detail StringBuilder detail = new StringBuilder(); if (this.mStoreDS.StoreTable.Rows.Count > 0) { EnterpriseDS.StoreTableRow store = this.mStoreDS.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() : "")); } return(detail.ToString()); }
private void refreshView() { // this.txtDetail.Text = ""; if (this.mStoreDS.StoreTable.Rows.Count > 0) { //Set header and body EnterpriseDS.StoreTableRow store = this.mStoreDS.StoreTable[0]; this.txtDetail.Text = store.StoreName.Trim() + " (sub store #" + store.SubStoreNumber.Trim() + ")" + "\r\n"; //Set body this.txtDetail.AppendText((!store.IsStoreAddressline1Null() ? store.StoreAddressline1.Trim() : "") + "\r\n"); this.txtDetail.AppendText((!store.IsStoreAddressline2Null() ? store.StoreAddressline2.Trim() : "") + "\r\n"); this.txtDetail.AppendText((!store.IsStoreCityNull() ? store.StoreCity.Trim() : "") + ", " + (!store.IsStoreStateNull() ? store.StoreState.Trim() : "") + " " + (!store.IsStoreZipNull() ? store.StoreZip.Trim() : "") + "\r\n"); this.txtDetail.AppendText((!store.IsContactNameNull() ? store.ContactName.Trim() : "") + ", " + (!store.IsPhoneNumberNull() ? store.PhoneNumber.Trim() : "") + "\r\n"); this.txtDetail.AppendText((!store.IsRegionDescriptionNull() ? store.RegionDescription.Trim() : "") + " (" + (!store.IsRegionNull() ? store.Region.Trim() : "") + "), " + (!store.IsDistrictNameNull() ? store.DistrictName.Trim() : "") + " (" + (!store.IsDistrictNull() ? store.District.Trim() : "") + ")" + "\r\n"); this.txtDetail.AppendText("Zone " + (!store.IsZoneNull() ? store.Zone.Trim() : "") + ", " + "Agent " + (!store.IsAgentNumberNull() ? store.AgentNumber.Trim() : "") + " " + (!store.IsAgentNameNull() ? store.AgentName.Trim() : "") + "\r\n"); this.txtDetail.AppendText("Window " + (!store.IsWindowTimeStartNull() ? store.WindowTimeStart.ToString("HH:mm") : "") + " - " + (!store.IsWindowTimeEndNull() ? store.WindowTimeEnd.ToString("HH:mm") : "") + ", " + "Del Days " + getDeliveryDays(store) + ", " + (!store.IsScanStatusDescrptionNull() ? store.ScanStatusDescrption.Trim() : "") + "\r\n"); this.txtDetail.AppendText("JA Transit " + (!store.IsStandardTransitNull() ? store.StandardTransit.ToString() : "") + ", " + "OFD " + getOFD(store) + "\r\n"); this.txtDetail.AppendText("Special Inst: " + (!store.IsSpecialInstructionsNull() ? store.SpecialInstructions.Trim() : "") + "\r\n"); } }