Simple database: Difference between revisions
Content added Content deleted
Line 378: | Line 378: | ||
{ |
{ |
||
// |
// |
||
// For appropriate use of this program |
// For appropriate use of this program |
||
// use standard Windows Command Processor or cmd.exe |
// use standard Windows Command Processor or cmd.exe |
||
// |
// |
||
Line 389: | Line 389: | ||
// To start cmd just double click at cmd.bat file. |
// To start cmd just double click at cmd.bat file. |
||
// |
// |
||
// |
// |
||
// |
// |
||
// Console application command line start command |
// Console application command line start command |
||
Line 422: | Line 422: | ||
// |
// |
||
// |
// |
||
// |
// |
||
⚫ | |||
// |
// |
||
// Command line example |
// Command line example |
||
Line 438: | Line 439: | ||
// |
// |
||
// Brackets and space between arguments and parameters are necessary. |
// Brackets and space between arguments and parameters are necessary. |
||
// Quotes must be used when parameters have more than one word. |
|||
// |
// |
||
// If not used as shown in examples, program will show error message. |
// If not used as shown in examples, program will show error message. |
||
// |
// |
||
Line 488: | Line 489: | ||
// Check parameters |
// Check parameters |
||
// |
// |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
// |
// |
||
// Minimum one parameter, category |
|||
⚫ | |||
// |
// |
||
if( |
if(args.Length==1) |
||
{ |
{ |
||
⚫ | |||
⚫ | |||
⚫ | |||
Console.WriteLine(); |
Console.WriteLine(); |
||
Console.WriteLine(" |
Console.WriteLine(" Missing Parameters Error..... "); |
||
Console.WriteLine(); |
Console.WriteLine(); |
||
⚫ | |||
⚫ | |||
else |
|||
{ |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
foreach (string a in args) |
foreach (string a in args) |
||
{ |
{ |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
} |
|||
} |
} |
||
⚫ | |||
⚫ | |||
// |
// |
||
// |
// Add new entry to Data base document |
||
⚫ | |||
⚫ | |||
⚫ | |||
// |
// |
||
if(parameters_ok) |
|||
⚫ | |||
{ |
|||
// |
|||
// |
|||
// |
// |
||
Console.WriteLine(); |
|||
⚫ | |||
Console.WriteLine(" Parameters are ok..... "); |
|||
⚫ | |||
Console.WriteLine(); |
Console.WriteLine(); |
||
Console.WriteLine(" |
Console.WriteLine(" Writing new entry to database..... "); |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
{ |
|||
⚫ | |||
} |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
w.Close(); |
|||
w.Dispose(); |
|||
⚫ | |||
// |
|||
// |
|||
Console.WriteLine(); |
|||
⚫ | |||
Create_Print_Documents(args); |
Create_Print_Documents(args); |
||
// |
// |
||
// |
// |
||
// |
// |
||
Console.WriteLine(); |
Console.WriteLine(); |
||
Console.WriteLine(" Add new entry command executed. "); |
Console.WriteLine(" Add new entry command executed. "); |
||
// |
// |
||
// |
// |
||
// |
// |
||
} |
} |
||
else |
else |
||
{ |
{ |
||
Console.WriteLine(); |
Console.WriteLine(); |
||
Console.WriteLine(" ! Parameters are not ok ! "); |
Console.WriteLine(" ! Parameters are not ok ! "); |
||
Console.WriteLine(); |
Console.WriteLine(); |
||
Console.WriteLine(" Add new entry command is not executed. "); |
Console.WriteLine(" Add new entry command is not executed. "); |
||
Console.WriteLine(); |
Console.WriteLine(); |
||
⚫ | |||
} |
} |
||
} |
} |