public ABLOCKZONEMASTER getBlockZoneMasterByAdrID(string adr_id) { ABLOCKZONEMASTER obj = null; using (DBConnection_EF con = new DBConnection_EF()) { obj = blockZoneMasterDao.getByAdrID(con, adr_id); } return(obj); }
public ABLOCKZONEMASTER getBlockZoneMasterByBlockIDsAndAdrID(string entry_sec_id, string adr_id) { ABLOCKZONEMASTER obj = null; //DBConnection_EF con = DBConnection_EF.GetContext(); //using (DBConnection_EF con = new DBConnection_EF()) using (DBConnection_EF con = DBConnection_EF.GetUContext()) { obj = blockZoneMasterDao.getByIDAndAdrID(con, entry_sec_id, adr_id); } return(obj); }
public ABLOCKZONEMASTER getBlockZoneMasterByEntrySecID(string entry_sec_id) { ABLOCKZONEMASTER block = null; //DBConnection_EF con = DBConnection_EF.GetContext(out isNew); using (DBConnection_EF con = DBConnection_EF.GetUContext()) { block = blockZoneMasterDao.getByID(con, entry_sec_id); con.Release(); } return(block); }
private void Block_zone_VehicleLeave(object sender, string vhID) { string vh_id = vhID; ABLOCKZONEMASTER block_master = sender as ABLOCKZONEMASTER; var block_detail = block_master.GetBlockZoneDetailSectionIDs(); foreach (string block_detail_sec_id in block_detail) { string sec_id = SCUtility.Trim(block_detail_sec_id); reserveBLL.RemoveManyReservedSectionsByVIDSID(vh_id, sec_id); } }
// public bool CheckAndNoticeBlockVhPassByAdrID(string leave_adr_id) //{ // bool isSuccess = true; // List<ABLOCKZONEMASTER> lstBZM = scApp.MapBLL.loadBZMByAdrID(leave_adr_id); // BLOCKZONEQUEUE waitblockZoneVH = null; // if (lstBZM == null || lstBZM.Count == 0) // return true; // //foreach (ABLOCKZONEMASTER master in lstBZM) // //{ // //switch (master.BLOCK_ZONE_TYPE) // switch (lstBZM[0].BLOCK_ZONE_TYPE) // { // case E_BLOCK_ZONE_TYPE.Branch: // waitblockZoneVH = scApp.MapBLL.findNextBlockZonePassVh_Branch(lstBZM); // break; // case E_BLOCK_ZONE_TYPE.Merge: // waitblockZoneVH = scApp.MapBLL.findNextBlockZonePassVh_Merge(lstBZM); // break; // } // if (waitblockZoneVH != null) // { // isSuccess = scApp.VehicleBLL.noticeVhPass(waitblockZoneVH); // } // else // { // isSuccess = false; // } // //} // return isSuccess; //} public (bool, BLOCKZONEQUEUE) NoticeBlockVhPassByEntrySecID(string entry_sec_id) { ABLOCKZONEMASTER blockMaster = getBlockZoneMasterByEntrySecID(entry_sec_id); if (!SCUtility.isEmpty(blockMaster.LEAVE_ADR_ID_1)) { return(CheckAndNoticeBlockVhPassByAdrID(blockMaster.LEAVE_ADR_ID_1)); } if (!SCUtility.isEmpty(blockMaster.LEAVE_ADR_ID_2)) { return(CheckAndNoticeBlockVhPassByAdrID(blockMaster.LEAVE_ADR_ID_2)); } return(false, null); }
public bool NoticeBlockVhPassByEntrySecID(string entry_sec_id) { bool isSuccess = true; ABLOCKZONEMASTER blockMaster = scApp.MapBLL.getBlockZoneMasterByEntrySecID(entry_sec_id); if (!SCUtility.isEmpty(blockMaster.LEAVE_ADR_ID_1)) { isSuccess &= scApp.MapBLL.CheckAndNoticeBlockVhPassByAdrID(blockMaster.LEAVE_ADR_ID_1); if (isSuccess) { return(isSuccess); } } if (!SCUtility.isEmpty(blockMaster.LEAVE_ADR_ID_2)) { isSuccess &= scApp.MapBLL.CheckAndNoticeBlockVhPassByAdrID(blockMaster.LEAVE_ADR_ID_2); } return(isSuccess); }
public void add(DBConnection_EF con, ABLOCKZONEMASTER vh_id) { con.ABLOCKZONEMASTER.Add(vh_id); con.SaveChanges(); }