public void GetDOFAData(int _dataCaptYM, string empDept = "") { EmpDept = empDept; FormsRepository formsRepository = new FormsRepository(); DataCaptYM = SessionManager.DataCaptYR > 0 ? SessionManager.DataCaptYR : (_dataCaptYM > 0 ? _dataCaptYM : 0); this.DofaData = formsRepository.GetDOFAFormDataByID(DataCaptYM, SessionManager.DeptID, empDept); if (DofaData == null || DofaData.Count == 0) { DofaData = new List <DofaInfo>(); DofaData.Add(new DofaInfo()); DataStatus = (int)DataAccess.Enum.DataStatus.DataEntryStartedbyOperator; DataStatusName = (DataAccess.Enum.DataStatus.DataEntryStartedbyOperator).GetStringValue(); } else { DataStatus = DofaData.First().DataStatus; DataStatusName = DofaData.First().DataStatusName; } if (!string.IsNullOrWhiteSpace(EmpDept)) { DofaData.ForEach(f => f.empDEPT = EmpDept); } }