/// <summary> /// Method Name : GetDateForDiplay /// Author : Vivek Bhavsar /// Creation Date : 23 Jan 2018 /// Purpose : sub method to set dates as per require format for estimate /// Revision : /// </summary> /// <param name="date"></param> /// <returns></returns> private string GetDateForDiplay(string date) { string dateValue = string.Empty; if (!string.IsNullOrEmpty(date)) { DateTime datetime = UtilityPCL.ConvertDateTimeInUSFormat(date); if (datetime != DateTime.MinValue) { dateValue = UtilityPCL.DisplayDateFormatForEstimate(datetime, Resource.MMddyyyyDateFormat); } } return(dateValue); }
/// <summary> /// Method Name : SetDays /// Author : Vivek Bhavsar /// Creation Date : 23 Jan 2018 /// Purpose : calculate days left & set date format /// Revision : /// </summary> /// <param name="customerMoveData"></param> /// <param name="moveData"></param> private void SetDays(MoveDataModel customerMoveData, GetMoveDataResponse moveData) { DateTime tempDateObject; if (!string.IsNullOrEmpty(moveData.MoveStartDate)) { tempDateObject = UtilityPCL.ConvertDateTimeInUSFormat(moveData.MoveStartDate); customerMoveData.daysLeft = UtilityPCL.CalulateMoveDays(tempDateObject).ToString(); customerMoveData.MoveStartDate = GetDateForDiplay(moveData.MoveStartDate); } if ((!string.IsNullOrEmpty(moveData.MoveEndDate)) && moveData.MoveEndDate != Resource.DateTBD) { customerMoveData.MoveEndDate = GetDateForDiplay(moveData.MoveEndDate); } else { customerMoveData.MoveEndDate = Resource.DateTBD; } }