public BTSTechnologyCreateHandler(GlobalSolusindoDb db, tblM_User user, BTSTechnologyValidator btsTechnologyValidator, BTSTechnologyFactory btsTechnologyFactory, BTSTechnologyQuery btsTechnologyQuery, AccessControl accessControl) : base(db, user) { this.btsTechnologyValidator = btsTechnologyValidator; this.btsTechnologyFactory = btsTechnologyFactory; this.btsTechnologyQuery = btsTechnologyQuery; this.btsTechnologyEntryDataProvider = new BTSTechnologyEntryDataProvider(db, user, accessControl, btsTechnologyQuery); }
public BTSImportExcelHandler(GlobalSolusindoDb db, tblM_User user, BTSValidator btsValidator, BTSFactory btsFactory, BTSTechnologyFactory bTSTechnologyFactory, BTSQuery btsQuery, AccessControl accessControl) : base(db, user) { this.btsValidator = btsValidator; this.btsFactory = btsFactory; this.btstFactory = bTSTechnologyFactory; this.btsQuery = btsQuery; this.btsEntryDataProvider = new BTSEntryDataProvider(db, user, accessControl, btsQuery); //((IObjectContextAdapter)Db).ObjectContext.CommandTimeout = 300; //set time out //db.Database.CommandTimeout = 300; }
public void AddBTSTechnologies(BTSDTO btsDTO, DateTime dateStamp) { if (btsDTO == null) { throw new ArgumentNullException("BTS model is null."); } foreach (var btsTechnologyDTO in btsDTO.BTSTechnologies) { var factory = new BTSTechnologyFactory(Db, User); tblM_BTSTechnology btsTechnology = factory.CreateFromDTO(btsTechnologyDTO, dateStamp); btsTechnology.BTS_FK = btsDTO.BTS_PK; btsTechnology = Db.tblM_BTSTechnology.Add(btsTechnology); } }
private void Initialize(BTSTechnologyValidator btsTechnologyValidator, BTSTechnologyFactory btsTechnologyFactory) { this.btsTechnologyValidator = btsTechnologyValidator; this.btsTechnologyFactory = btsTechnologyFactory; }