コード例 #1
0
 public Employee(string name, int salary, string jobTitle, string description, BasicPropertys propertys)
 {
     this.name        = name;
     this.salary      = salary;
     this.propertys   = propertys;
     this.jobTitle    = jobTitle;
     this.description = description;
 }
コード例 #2
0
 public Contract(string name, string description, Industry industry, int award,
                 int level, int timeLimit, BasicPropertys propertys)
 {
     this.name        = name;
     this.description = description;
     this.industry    = industry;
     this.award       = award;
     this.level       = level;
     this.propertys   = propertys;
     this.timeLimit   = timeLimit;
 }
コード例 #3
0
  public static void Main(string[] s)
  {
      BasicPropertys test    = new BasicPropertys(0, 0, 0);
      FileHandler    handler = new FileHandler();

      handler.saveObject(test, null);
      BasicPropertys read = (BasicPropertys)handler.readObject("test");

      Debug.Assert(read.Frontend == 1);
      Console.WriteLine(read.Frontend == 1);
  }
コード例 #4
0
 private void updateWorkForce()
 {
     workforce = new BasicPropertys(0, 0, 0);
     foreach (KeyValuePair <Property, List <Employee> > entry in workAssigns)
     {
         foreach (Employee e in entry.Value)
         {
             int hisAbility = e.getPropertys().getPropertyQuant(entry.Key);
             workforce.updatePropertyQuant(entry.Key, hisAbility);
         }
     }
 }
コード例 #5
0
//need fail function

  public Project(Contract contract, List <Employee> employees)
  {
      this.contract = contract;
      // record the workload requirements of the contract
      workload           = contract.getPropertys().givecopy();
      listOfPropertyLeft = workload.getListOfProperty();

      // add employees & record work force
      foreach (Employee e in employees)
      {
          manpowers.Add(e);
          e.gotowork();
      }
      workAssignsInit();
  }
コード例 #6
0
// add from input to the current propertys
// current = input

  public void add_propertys(BasicPropertys input)
  {
      this.Frontend += input.Frontend;
      this.Backend  += input.Backend;
      this.Graphics += input.Graphics;
  }