public static void SaveModel <TObject>(TObject obj)
     where TObject : class, IEntityObject, IEntityObject <TObject>, new()
 {
     using (ChannelFactory <IMachineRepairService> alphaserverFactory = GetChanel())
     {
         IMachineRepairService alphaserverProxy = alphaserverFactory.CreateChannel();
         alphaserverProxy.SaveModel(obj);
     }
 }
 public static TObject GetModel <TObject>(EntitySelectQuery selectQuery)
     where TObject : class, IEntityObject, IEntityObject <TObject>, new()
 {
     using (ChannelFactory <IMachineRepairService> alphaserverFactory = GetChanel())
     {
         IMachineRepairService alphaserverProxy = alphaserverFactory.CreateChannel();
         return(alphaserverProxy.GetModel(new TObject(), selectQuery) as TObject);
     }
 }
 public static EList <TObject> GetModels <TObject>()
     where TObject : class, IEntityObject, IEntityObject <TObject>, new()
 {
     using (ChannelFactory <IMachineRepairService> alphaserverFactory = GetChanel())
     {
         IMachineRepairService alphaserverProxy = alphaserverFactory.CreateChannel();
         return(alphaserverProxy.GetModels(new TObject()) as EList <TObject>);
     }
 }
 public static EList <TObject> GetModels <TObject>(EntitySelectQuery selectQuery)
     where TObject : class, IEntityObject, IEntityObject <TObject>, new()
 {
     using (ChannelFactory <IMachineRepairService> alphaserverFactory = GetChanel())
     {
         IMachineRepairService alphaserverProxy = alphaserverFactory.CreateChannel();
         var obj = new TObject();
         return(alphaserverProxy.GetModelsWithQuery(obj, selectQuery) as EList <TObject>);
     }
 }
 public BatchService(IBatchDataService dataService, IUserService userService, ISupplyDataService supplyDataService,
                     IFactoryExpenseService factoryExpenseService, ILabourCostService labourCostService,
                     IMachineRepairService machineRepairService, IOtherExpenseService otherExpenseService,
                     IBatchOutPutService batchOutPutService, ISupplyService supplyService)
 {
     this._dataService           = dataService;
     this._userService           = userService;
     this._supplyDataService     = supplyDataService;
     this._factoryExpenseService = factoryExpenseService;
     this._labourCostService     = labourCostService;
     this._machineRepairService  = machineRepairService;
     this._otherExpenseService   = otherExpenseService;
     this._batchOutPutService    = batchOutPutService;
     this._supplyService         = supplyService;
 }
 public MachineRepairApiController(IMachineRepairService MachineRepairService, IUserService userService)
 {
     this._machineRepairService = MachineRepairService;
     this._userService          = userService;
     userId = Microsoft.AspNet.Identity.IdentityExtensions.GetUserId(RequestContext.Principal.Identity);
 }