Exemple #1
0
        public static void Main(string[] args)
        {
            InputModel input = new InputModel(easyFile);

            ManagersData data = new ManagersData();

            for (int i = 0; i < input.status.TotalSteps; i++)
            {
                data.ManageInputModel(input, i);
            }

            new OutputWriter("ouput.txt").WriteSolution(input.status.vehicles);
        }
Exemple #2
0
        protected string ManagerName(DataRow dr)
        {
            string key          = string.Empty;
            string notFoundText = string.Empty;

            switch (Report.ReportType)
            {
            case ReportTypes.JU:
                key          = "ManagerUniqueName";
                notFoundText = "Not Found";
                break;

            case ReportTypes.SUB:
                key          = "ManagerName";
                notFoundText = "Manager Not Found";
                break;
            }

            string result;

            DataRow[] drManagers = ManagersData.Select(string.Format("AccountID = {0}", dr["AccountID"]));

            if (!string.IsNullOrEmpty(key) && ManagersData.Columns.Contains(key))
            {
                if (drManagers.Length > 0)
                {
                    result = Utility.ConvertTo(drManagers[0][key], "[unknown]");
                }
                else
                {
                    result = notFoundText;
                }
            }
            else
            {
                result = "column does not exist: " + key;
            }

            return(result);
        }