/// <summary> /// 出勤時間書き込み /// </summary> public void setArrivalTimeStamp() { using (TextReader txtRead = _SmbRecordFile.SmbReader(_FileName.ToString())) { _Records = _CsvList.ReadCsv(txtRead); var RecordToday = _Records.FirstOrDefault(record => record.Date.ToString() == _NowTime.ToString("yyyy/MM/dd")); int index = _Records.IndexOf(RecordToday); RecordToday.ArrivalTime = _NowTime.ToString("HH:mm"); _Records[index] = RecordToday; TextWriter txtWrite = _SmbRecordFile.SmbWriter(_FileName.ToString()); _CsvList.WriteCsv(txtWrite, _Records); } }
/// <summary> /// コンストラクタです。 /// 環境変数を設定します。 /// </summary> public CsvToUserList(Entity.Configure EntityConfig) { CSS.Library.Timecard.Entity.Config.Properties props = new CSS.Library.Timecard.Entity.Config.Properties(); props.User = EntityConfig.User; props.Password = EntityConfig.Password; props.UriAdress = EntityConfig.UriAdress; props.FolderName = EntityConfig.FolderName; props.Domain = EntityConfig.Domain; CsvToList csvList = new CsvToList(); SharedFile smbUserList = new SharedFile(props); if (smbUserList.SmbExists("UserList.txt")) { _Users = csvList.Users(smbUserList.SmbReader("UserList.txt")); } }