DRMFSS.BLL.Dispatch.GetSMSText C# (CSharp) Method

GetSMSText() public method

Gets the SMS text.
public GetSMSText ( ) : string
return string
        public string GetSMSText()
        {
            StringBuilder builder = new StringBuilder();
            CTSContext entities = new CTSContext();
            BLL.Dispatch dispatch  = entities.Dispatches.Where(d => d.DispatchID == this.DispatchID).SingleOrDefault();
            if (dispatch != null)
            {
                BLL.DispatchDetail com = dispatch.DispatchDetails.FirstOrDefault();
                if (com != null)
                {
                    builder.Append(string.Format("There is a Dispatch with an ammount of {0}(MT) - {1} to your FDP({2}) ", com.RequestedQuantityInMT, com.Commodity.Name, dispatch.FDP.Name));
                    builder.Append(string.Format("on a car with plate no - {0}", dispatch.PlateNo_Prime));
                }
            }

            return builder.ToString();
        }