public lockingTypeCompositeType getLockingTypeById(int iIdLockingType) { lockingTypeCompositeType etct = new lockingTypeCompositeType(); LockingType et = new LockingType(); etct = et.GetLockingTypeById(iIdLockingType); return(etct); }
public List <lockingTypeCompositeType> getAllLockingType() { List <lockingTypeCompositeType> lst = new List <lockingTypeCompositeType>(); LockingType et = new LockingType(); lst = et.getAll(); return(lst); }
public bool ExistLockingType(String sDescription, int iIdLockingType) { LockingType et = new LockingType(); if (et.getCountLockingTypeByDescription(sDescription, iIdLockingType) > 0) { return(true); } else { return(false); } }
public bool ExistLockingTypeDuplicate(String sDescription, int iIdArea) { LockingType t = new LockingType(); if (t.getCountLockingTypeDuplicate(iIdArea, sDescription) > 0) { return(true); } else { return(false); } }
public static ILockStrategy Create(LockingType strategy) { switch (strategy) { case LockingType.ReaderWriter: return new LockStrategy(); case LockingType.Exclusive: return new ForcefulLockStrategy(); default: throw new ArgumentOutOfRangeException(); } }
public bool ExistLocking(String sDescription) { var chocorroles = new LockingType(); var swap = chocorroles.getAll(); var qbo = (from s in swap where s.sDescription.Equals(sDescription) select s).Count(); if (qbo < 1) { return(false); } else { return(true); } }
public static ILockStrategy Create(LockingType strategy) { switch (strategy) { case LockingType.ReaderWriter: return(new LockStrategy()); case LockingType.Exclusive: return(new ForcefulLockStrategy()); default: throw new ArgumentOutOfRangeException(); } }
public errorCompositeType UpdateLockingType(int iIdLockingType, String sDescription) { errorCompositeType lstError = new errorCompositeType(); try { LockingType et = new LockingType(); et.UpdateLockingType(iIdLockingType, sDescription); lstError.bError = true; lstError.sError = ""; return(lstError); } catch (Exception ex) { lstError.bError = false; lstError.sError = ex.Message; return(lstError); } }
public errorCompositeType DeleteLockingType(int iIdLockingType) { errorCompositeType lstError = new errorCompositeType(); try { LockingType et = new LockingType(); et.DeleteLockingType(iIdLockingType); lstError.bError = true; lstError.sError = ""; return(lstError); } catch (Exception ex) { lstError.bError = false; lstError.sError = ex.Message; return(lstError); } }
public errorCompositeType AddLockingType(String description) { errorCompositeType lstError = new errorCompositeType(); try { LockingType et = new LockingType(); et.InsertLockingType(description); lstError.bError = true; lstError.sError = ""; return(lstError); } catch (Exception ex) { lstError.bError = false; lstError.sError = ex.Message; return(lstError); } }
public TaskList(LockingType strategy) : this(LockStrategyFactory.Create(strategy)) { }