public string GenerateDeliveryReference(int maxRefNo) { string refCode = _commonGateway.GetAllSubReferenceAccounts().ToList().Find(n => n.Id.Equals(Convert.ToInt32(ReferenceType.Distribution))).Code; string temp = (maxRefNo + 1).ToString(); string reference = DateTime.Now.Year.ToString().Substring(2, 2) + refCode + temp; return(reference); }
/// <summary> /// id=4 stands dispatch from factory...... /// </summary> /// <param name="maxDispatchNo"></param> /// <returns></returns> private string GenerateDispatchReference(int maxDispatchNo) { string refCode = _commonGateway.GetAllSubReferenceAccounts().ToList().Find(n => n.Id == Convert.ToInt32(ReferenceType.Dispatch)).Code; string temp = (maxDispatchNo + 1).ToString(); string reference = DateTime.Now.Year.ToString().Substring(2, 2) + refCode + temp; return(reference); }