示例#1
0
 public string AddEmpire(EmpireDTO empire)
 {
     try
     {
         logic.AddEmpire(new Empire()
         {
             EMPNO = logic.GetEmpires().Max(x => x.EMPNO) + 1,
             EGOV  = empire.EGov,
             ENAME = empire.EName
         });
         return("SUCCESS");
     }
     catch
     {
         return("FAIL");
     }
 }
 public void AddEmpire(EmpireDTO empire)
 {
     logic.AddEmpire(EmpireDTO.Mapper.Map <EmpireDTO, Empire>(empire));
     Clients.All.NewEmpire(empire);
 }
示例#3
0
 public bool AddEmpire(EmpireDTO empire)
 {
     logic.AddEmpire(EmpireDTO.Mapper.Map <EmpireDTO, Empire>(empire));
     return(true);
 }