public FileManagerForm(Enums.TypePath tp, long id_controller) { InitializeComponent(); path_work = getPath(tp, id_controller); searchFiles(); webBrowser.DocumentText = TruckSystem.Properties.Resources.SelectOneFile; }
string getPath(Enums.TypePath tp, long id) { string r = ""; switch (tp) { case Enums.TypePath.business: r = Path.Combine(Paths.business); break; case Enums.TypePath.drivers: r = Path.Combine(Paths.drivers, id.ToString()); break; case Enums.TypePath.trucks: r = Path.Combine(Paths.trucks, id.ToString()); break; case Enums.TypePath.trailers: r = Path.Combine(Paths.trailers, id.ToString()); break; case Enums.TypePath.customers: r = Path.Combine(Paths.customers, id.ToString()); break; case Enums.TypePath.bank_accounts: r = Path.Combine(Paths.bank_accounts, id.ToString()); break; case Enums.TypePath.mail: r = Path.Combine(Paths.mail, id.ToString()); break; } Paths.verifyPath(r); return(r); }