public bool InsertChargingQcStationinfo(List <tblChargerMaster> chargingCheckedList) { try { foreach (var items in chargingCheckedList) { //var logisticsSendItems = new tblLogisticsSentItems(); var tblChargerMaster = new tblChargerMaster { ProjectId = items.ProjectId, ProjectName = items.ProjectName, LineId = items.LineId, MobileCode = items.MobileCode, ChargingBatch = items.ChargingBatch, ChargingPassed = items.ChargingPassed, ChargingIssue = items.ChargingIssue, Reworked = items.Reworked, AddedBy = items.AddedBy, AddedDate = DateTime.Now, }; _entity.tblChargerMaster.Add(tblChargerMaster); _entity.SaveChanges(); } } catch (Exception ex) { //transaction.Dispose(); throw ex; } return(true); }
public List <tblChargerMaster> ChargingMasterInfo(tblChargerMaster tblChargerMaster) { try { ISelectingCommon iDataAccessSelect = new DALGetCommonSelecting(); return(iDataAccessSelect.ChargingMasterInfo(tblChargerMaster)); } catch (Exception ex) { throw ex; } }
//public object ChargingMasterInfo(WCMS_ENTITY.tblChargerMaster tblChargerMaster) //{ // throw new NotImplementedException(); //} public List <tblChargerMaster> ChargingMasterInfo(tblChargerMaster tblChargerMaster) { var agingMasters = new List <tblChargerMaster>(); try { agingMasters = _CommonManager.ChargingMasterInfo(tblChargerMaster); } catch (Exception ex) { } return(agingMasters); }
public List <tblChargerMaster> ChargingMasterInfo(tblChargerMaster tblChargerMaster) { List <tblChargerMaster> list; try { list = _wcmsEntities.tblChargerMaster .WhereIf(tblChargerMaster.MobileCode != null, x => x.MobileCode == tblChargerMaster.MobileCode) //.WhereIf(tblAgingMaster.Passed != null, x => x.Passed == tblAgingMaster.Passed) .WhereIf(tblChargerMaster.ChargingBatch != null, x => x.ChargingBatch == tblChargerMaster.ChargingBatch) .AsNoTracking().ToList(); } catch (Exception ex) { throw ex; } return(list); }