コード例 #1
0
        public static void  WriteFile(string filePath, string outputPath)
        {
            try {
                foreach (var Line in ReadFile(filePath))
                {
                    str_Array = BusinessRules.ReadLines(Line).Split('\t');
                    if (BusinessRules.CheckDate(str_Array[2]))
                    {
                        writeText += BusinessRules.ReadLines(Line) + "\t" + BusinessRules.SalaryIncreament(str_Array[3]) + "\r\n";
                    }
                    else
                    {
                        writeText += BusinessRules.ReadLines(Line) + "\t" + str_Array[3] + "\r\n";
                    }
                }

                File.AppendAllText(outputPath, writeText.ToString());
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #2
0
ファイル: UnitTest1.cs プロジェクト: mohit10797/Assignment
 public void CheckDateTest()
 {
     Assert.AreEqual(true, BusinessRules.CheckDate("10-12-2017"));
 }