public bool InsertRoles(tblRoles roles) { try { _entity.tblRoles.Add(roles); _entity.SaveChanges(); } catch (Exception ex) { throw ex; } return(true); }
public bool InsertImeiInfo(tblIMEI im) { try { _entity.tblIMEI.Add(im); _entity.SaveChanges(); } catch (Exception exception) { throw exception; } return(true); }
public bool InsertImeiInfo(tblInventoryForServiceItem im) { try { _entities.tblInventoryForServiceItems.Add(im); _entities.SaveChanges(); } catch (Exception exception) { throw exception; } return(true); }
public bool InsertBatteryComponentInfo(tblBatteryComponentInfo batteryComponent) { try { _entity.tblBatteryComponentInfo.Add(batteryComponent); _entity.SaveChanges(); return(true); } catch (Exception exception) { throw exception; } }
//For MMI public bool InsertCkdMmiComponentInfo(tblCkdMmiMaster mmItabltestComponent) { try { _entity.tblCkdMmiMaster.Add(mmItabltestComponent); _entity.SaveChanges(); return(true); } catch (Exception exception) { throw exception; } }
public bool InsertLcdGlueWorkingModels(tblLcdGlueWorkingModels workingModel) { try { _entity.tblLcdGlueWorkingModels.Add(workingModel); _entity.SaveChanges(); } catch (Exception ex) { throw ex; } return(true); }
public bool InsertInventoryOutInfo(List <tblInventoryForServiceItem> im) { try { foreach (var s in im) { var list = new tblInventoryForServiceItem(); list = _entities.tblInventoryForServiceItems.FirstOrDefault( x => x.IMEI1 == s.IMEI1 || x.IMEI2 == s.IMEI1); if (list != null) { if (s.IsInventoryOut == null) { list.IsInventoryOut = true; } if (s.IsInventoryOutDate == null) { list.IsInventoryOutDate = DateTime.Now; } _entities.Entry(list).State = EntityState.Modified; _entities.SaveChanges(); } else { return(false); } } } catch (Exception exception) { throw exception; } return(true); }
//[OperationBehavior(TransactionScopeRequired = true, TransactionAutoComplete = true)] // [TransactionFlow(TransactionFlowOption.Allowed)] public bool InsertEmployeeInfo(EmployeeInfo employee) { try { _entity.EmployeeInfo.Add(employee); _entity.SaveChanges(); } catch (Exception ex) { throw ex; } return(true); }
public bool InsertFunctionalQcStatus(ProductionMaster productionMaster) { try { _entity.ProductionMaster.Add(productionMaster); _entity.SaveChanges(); } catch (Exception ex) { throw ex; } return(true); }