本文整理汇总了C#中Project.CloseProject方法的典型用法代码示例。如果您正苦于以下问题:C# Project.CloseProject方法的具体用法?C# Project.CloseProject怎么用?C# Project.CloseProject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Project
的用法示例。
在下文中一共展示了Project.CloseProject方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
static void Main()
{
var computer = new Sale("Lenovo","12-12-2014", 650);
var dvd = new Sale("Philips", "12-12-2015", 300);
var tv = new Sale("Samsung", "12-12-2016", 620);
var john = new SalesEmployee(8120403565, "John", "Carera", 1500, Department.Production, dvd);
var ivan = new SalesEmployee(85264040262, "Ivan", "Smallhouse", 5200, Department.Sales, computer, tv);
var ludnica = new Project("gospodari.bg", "05-07-1947", "some details");
var web = new Project("home.bg", "04-04-1984", "deeeetails");
ludnica.CloseProject();
var doncho = new Developer(85012236461, "Doncho", "Donkov", 41500, Department.Production, web, ludnica);
var kiro = new Manager(7511119253, "Kiro", "Pora", john, ivan, doncho);
var listOfPeople = new List<IPerson> {kiro, doncho, ivan, john};
foreach (var person in listOfPeople)
{
Console.WriteLine(person);
Console.WriteLine("--------------------------------------------------------------------------------");
}
}
示例2: Main
static void Main()
{
List<Person> people = new List<Person>();
Employee bill = new RegularEmployee(1234, "Bill", "Smith", 10.00, Department.Accounting);
Person frank = new SalesEmployee(8725, "Frank", "Richardson", 20.00,
new Sale("Toy", new DateTime(2015, 7, 19), 5.00),
new Sale("MEGA TOY", new DateTime(2015, 8, 29), 10.00));
RegularEmployee hank = new RegularEmployee(8456, "Hank", "Tyson", 26.00, Department.Accounting);
Manager homer = new Manager(8726, "Homer", "James", 50.00, Department.Accounting,
bill,
hank);
Project x = new Project("Project X", new DateTime(2013, 11, 11), "[no details]", State.Open);
x.CloseProject();
Developer ivan = new Developer(6545, "Ivan", "Ivanov", 32.00,
new Project("Flying Car", new DateTime(2014, 1, 24), "[no details]", State.Open),
x);
Customer arin = new Customer(7555, "Arin", "Newman", 10000.12);
people.Add(bill);
people.Add(frank);
people.Add(hank);
people.Add(homer);
people.Add(ivan);
people.Add(arin);
foreach (var person in people)
{
Console.WriteLine(person.ToString() + "\n------------------------------------------------------");
}
}
示例3: Main
static void Main()
{
var superMario = new Product("Super Mario", DateTime.Now, 30);
var textEditor = new Product("Editor 2014", DateTime.Now, 100);
var calculator = new Project("Calculator", DateTime.Now);
var pdfConverter = new Project("PDF converter", DateTime.Now, "Convert text file in PDF");
pdfConverter.CloseProject();
var asen = new SalesEmployee("Asen", "Mikov", 10001, 1200, Department.Marketing);
asen.AddSales(superMario);
asen.AddSales(textEditor);
Console.WriteLine(asen);
Console.WriteLine();
var ivan = new SalesEmployee("Ivan", "Ivanov", 10002, 1250, Department.Marketing);
ivan.AddSales(textEditor);
ivan.AddSales(textEditor);
var tzvetomir = new Delveloper("Tzvetomir", "Serov", 10003, 1500, Department.Production);
tzvetomir.AddProject(calculator);
tzvetomir.AddProject(pdfConverter);
var dimitrina = new Delveloper("Dimitrima", "Shamanova", 10004, 1600, Department.Production);
dimitrina.AddProject(calculator);
dimitrina.AddProject(pdfConverter);
Console.WriteLine(dimitrina);
Console.WriteLine();
var managerGesho = new Manager("Gesho", "Mihailov", 12345, 1800, Department.Marketing);
managerGesho.AddEploymee(asen);
managerGesho.AddEploymee(ivan);
Console.WriteLine(managerGesho);
Console.WriteLine();
var managerPesho = new Manager("Pesho", "Milanov", 12346, 1900, Department.Production);
managerPesho.AddEploymee(dimitrina);
managerPesho.AddEploymee(tzvetomir);
Console.WriteLine(managerPesho);
}
示例4: Main
static void Main()
{
var ultraGame = new Product("UltraGame", DateTime.Now, 30);
var textEditor = new Product("Editor 2014", DateTime.Now, 100);
var calculator = new Project("Calculator", DateTime.Now);
var pdfConverter = new Project("PDF converter", DateTime.Now, "Convert text file in PDF");
pdfConverter.CloseProject();
var pesho = new SalesEmployee("Pesho", "Peshev", 10001, 1200, Department.Marketing);
pesho.AddSales(ultraGame);
pesho.AddSales(textEditor);
Console.WriteLine(pesho);
Console.WriteLine();
var ivan = new SalesEmployee("Ivan", "Ivanov", 10002, 1250, Department.Marketing);
ivan.AddSales(textEditor);
ivan.AddSales(textEditor);
var tsvetan = new Delveloper("Tsvetan", "Tsvetanov", 10003, 1500, Department.Production);
tsvetan.AddProject(calculator);
tsvetan.AddProject(pdfConverter);
var gergana = new Delveloper("Gergana", "Gergina", 10004, 1600, Department.Production);
gergana.AddProject(calculator);
gergana.AddProject(pdfConverter);
Console.WriteLine(gergana);
Console.WriteLine();
var managerTodor = new Manager("Todor", "Todorov", 12345, 1800, Department.Marketing);
managerTodor.AddEploymee(pesho);
managerTodor.AddEploymee(ivan);
Console.WriteLine(managerTodor);
Console.WriteLine();
var managerIvanNeivanov = new Manager("Ivan", "Neivanov", 12346, 1900, Department.Production);
managerIvanNeivanov.AddEploymee(gergana);
managerIvanNeivanov.AddEploymee(tsvetan);
Console.WriteLine(managerIvanNeivanov);
}
示例5: Main
static void Main(string[] args)
{
Project project1 = new Project("Zaludo raboti", new DateTime(2014, 02, 12), "zaludo bez rabota ne stoj!", true);
Project project2 = new Project("Prituri se planinata", new DateTime(2015, 01, 01), "...", true);
Project project3 = new Project("Probiwame dupki wsqkakwi", new DateTime(2014, 11, 20), "...", true);
Project project4 = new Project("Svobodata, Sancho!", new DateTime(2013, 05, 05), "Dulcinea", true);
Project project5 = new Project("S curvuli po divia zapad", new DateTime(2015, 02, 19), "...", false);
Sale sale1 = new Sale("Tic-Tac", new DateTime(2014, 07, 08), 2.50);
Sale sale2 = new Sale("Oreo", new DateTime(2013, 05, 10), 15.0);
Sale sale3 = new Sale("Perwoll", new DateTime(2015, 09, 26), 100.0);
Sale sale4 = new Sale("Samsung Galaxy S6", new DateTime(2015, 05, 19), 1049.90);
Sale sale5 = new Sale("LG G4", new DateTime(2015, 03, 05), 839.90);
Sale sale6 = new Sale("ALCATEL ONETOUCH IDOL 3-4.7", new DateTime(2015, 04, 16), 199.90);
Sale sale7 = new Sale("Huawei Ascend Y600", new DateTime(2015, 03, 15), 19.90);
Sale sale8 = new Sale("Microsoft Lumia 435 Dual", new DateTime(2014, 12, 19), 4.90);
Customer cust1 = new Customer(826551245, "Borislav", "Ananiev");
Customer cust2 = new Customer(486538746, "Detelin", "Tsvetkov");
Customer cust3 = new Customer(948765987, "Anton", "Dragichev");
Developer dev1 = new Developer(23328582, "Georgi", "Georgiev", 1500, Department.Production);
Developer dev2 = new Developer(2627535, "Tihomir", "Dimitrov", 1800, Department.Marketing, project1, project3, project4);
Developer dev3 = new Developer(95869522, "Vasil", "Naydenov", 1650, Department.Accounting, project1, project4, project5);
SalesEmployee salempl1 = new SalesEmployee(872822223, "Krasimir", "Yordanov", 1900, Department.Sales, sale1, sale2, sale3);
SalesEmployee salempl2 = new SalesEmployee(288252565, "Ivan", "Popov", 2500, Department.Sales, sale4, sale5, sale6);
SalesEmployee salempl3 = new SalesEmployee(288252565, "Mario", "Lyaskov", 1050, Department.Sales, sale7, sale8);
Manager boss1 = new Manager(652341265, "Evgeni", "Manchev", 3000, Department.Accounting, dev3);
Manager boss2 = new Manager(37426423, "Oleg", "Zapryanov", 3500, Department.Sales, salempl1, salempl2, salempl3);
Manager boss3 = new Manager(92308748, "Radostina", "Koleva", 3250, Department.Marketing, dev1, dev2);
dev1.AddProject(project1);
project2.CloseProject();
project5.CloseProject();
cust1.AddPerchuse(25.44);
cust2.AddPerchuse(454.00);
cust3.AddPerchuse(4451.44);
List<Person> persons = new List<Person>()
{
cust1,
cust2,
cust3,
dev1,
dev2,
dev3,
salempl1,
salempl2,
salempl3,
boss1,
boss2,
boss3
};
foreach (var person in persons)
{
Console.WriteLine(person);
}
}