/// <summary> /// Get Unit by id /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// Id of entity to retrieve /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task <object> GetAsyncByidAsync(this IUnits operations, int id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.GetAsyncByidWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { if ((this._parent.XUnit == null)) { IUnits xUnitCasted = item.As <IUnits>(); if ((xUnitCasted != null)) { this._parent.XUnit = xUnitCasted; return; } } if ((this._parent.YUnit == null)) { IUnits yUnitCasted = item.As <IUnits>(); if ((yUnitCasted != null)) { this._parent.YUnit = yUnitCasted; return; } } if ((this._parent.CrvPts == null)) { IPointArray crvPtsCasted = item.As <IPointArray>(); if ((crvPtsCasted != null)) { this._parent.CrvPts = crvPtsCasted; return; } } }
/// <summary> /// 桝ĺ ĺä˝ /// </summary> /// <param name="Units"></param> /// <returns></returns> public int AddUnits(IUnits Units) { IDvTable dvt = entityfactory.CreateDriveTable(Units); int i = dvt.Insert(); return(i); }
private void OnTriggerEnter(Collider other) { if (other.gameObject.tag == "Player") { unit = other.gameObject.GetComponent <PlayerInfo>(); targetAcquired = true; } else { if (other.gameObject.tag == "Enemy" && sender == "Player") { unit = other.gameObject.GetComponent <EnemyInfo>(); targetAcquired = true; } } if (other.gameObject.tag == "Player" && sender == "Player") { targetAcquired = false; } if (unit != null && targetAcquired) { unit.Hurt(damage); Destroy(gameObject); targetAcquired = false; } }
public InventoryBasicDataController(IStoreTypes storeTypes, IBrands brands, IItemTypes itemTypes, IUnits units, ICompoundUnits compoundUnits) //, ICompoundUnits compoundUnits { _compoundUnits = compoundUnits; _itemTypes = itemTypes; _brands = brands; _units = units; _storeTypes = storeTypes; }
/// <summary> /// čˇĺć°çĺŻç¨çĺä˝çźç /// </summary> /// <param name="Unit"></param> /// <returns></returns> public long GetNewUnitsCode(IUnits Unit) { long i = 0; DataHelper dh = new DataHelper(); i = dh.GetMaxField(Unit, "UnitCode", this.entityfactory) + 1; return(i); }
/// <summary> /// ćĽčŻ˘ććĺä˝ /// </summary> /// <returns></returns> public List <IUnits> QueryUnits() { IUnits nit = entityfactory.CreateEntityInstance <IUnits>(); IDvTable dvt = entityfactory.CreateDriveTable(nit); DataSet ds = dvt.Select(); List <IUnits> uitlist = this.dh.Convert <IUnits>(nit.GetType(), ds); return(uitlist); }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { if ((this._parent.SetMag == null)) { IAnalogueValue setMagCasted = item.As <IAnalogueValue>(); if ((setMagCasted != null)) { this._parent.SetMag = setMagCasted; return; } } if ((this._parent.Units == null)) { IUnits unitsCasted = item.As <IUnits>(); if ((unitsCasted != null)) { this._parent.Units = unitsCasted; return; } } if ((this._parent.SVC == null)) { IScaledValueConfig sVCCasted = item.As <IScaledValueConfig>(); if ((sVCCasted != null)) { this._parent.SVC = sVCCasted; return; } } if ((this._parent.MinVal == null)) { IAnalogueValue minValCasted = item.As <IAnalogueValue>(); if ((minValCasted != null)) { this._parent.MinVal = minValCasted; return; } } if ((this._parent.MaxVal == null)) { IAnalogueValue maxValCasted = item.As <IAnalogueValue>(); if ((maxValCasted != null)) { this._parent.MaxVal = maxValCasted; return; } } if ((this._parent.StepSize == null)) { IAnalogueValue stepSizeCasted = item.As <IAnalogueValue>(); if ((stepSizeCasted != null)) { this._parent.StepSize = stepSizeCasted; return; } } }
/// <summary> /// ć´ć°ĺä˝ /// </summary> /// <param name="Units"></param> /// <returns></returns> public int UpdateUnits(IUnits Units) { IDvTable dvt = entityfactory.CreateDriveTable(Units); dvt.WhereClause("UnitCode", Operator.Deng, LinkOperator.nul); int i = dvt.Update(); return(i); }
public void AddUnits(IUnits execute) { if (_units == null) { _units = new[] { execute }; return; } Array.Resize(ref _units, Length + 1); _units[Length - 1] = execute; }
/// <summary> /// 秝é¤ĺä˝ /// </summary> /// <param name="UnitName"></param> /// <returns></returns> public int RemoveUnits(string UnitName) { IUnits nit = entityfactory.CreateEntityInstance <IUnits>(); IDvTable dvt = entityfactory.CreateDriveTable(nit); nit.UnitName = UnitName; dvt.WhereClause("UnitName", Operator.Deng, LinkOperator.nul); int i = dvt.Delete(); return(i); }
/// <summary> /// ć šćŽĺä˝çźç ćĽčŻ˘ĺä˝ /// </summary> /// <param name="UnitCode"></param> /// <returns></returns> public IUnits QueryUnitsForCode(long UnitCode) { IUnits uit = entityfactory.CreateEntityInstance <IUnits>(); IDvTable dvt = entityfactory.CreateDriveTable(uit); uit.UnitCode = UnitCode; dvt.WhereClause("UnitCode", Operator.Deng, LinkOperator.nul); DataSet ds = dvt.Select(); uit = this.dh.Convert <IUnits>(uit.GetType(), ds, 0); return(uit); }
/// <summary> /// ć šćŽĺä˝ćĽčŻ˘ç¨ćˇ /// </summary> /// <param name="Units"></param> /// <returns></returns> public virtual List <IUser> QueryUser(IUnits Units) { IUser user = entityfactory.CreateEntityInstance <IUser>(); user.UnitCode = Units.UnitCode; IDvTable dvt = entityfactory.CreateDriveTable(user); dvt.WhereClause("UnitCode", Operator.Deng, LinkOperator.nul); DataSet ds = dvt.Select(); List <IUser> list = this.dh.Convert <IUser>(user.GetType(), ds); return(list); }
public void ClearUnits(IUnits unit) { for (int i = 0; i < _units.Length; i++) { if (_units[i].GetPosition() == unit.GetPosition()) { _checkBoold = true; } if (_checkBoold) { if (i <= _units.Length - 1) { _units[i] = _units[i]; } } } _units[_units.Length - 1] = null; Array.Resize(ref _units, Length - 1); }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { if ((this._parent.InstMag == null)) { IAnalogueValue instMagCasted = item.As <IAnalogueValue>(); if ((instMagCasted != null)) { this._parent.InstMag = instMagCasted; return; } } if ((this._parent.Q == null)) { IQuality qCasted = item.As <IQuality>(); if ((qCasted != null)) { this._parent.Q = qCasted; return; } } if ((this._parent.T == null)) { ITimeStamp tCasted = item.As <ITimeStamp>(); if ((tCasted != null)) { this._parent.T = tCasted; return; } } if ((this._parent.Units == null)) { IUnits unitsCasted = item.As <IUnits>(); if ((unitsCasted != null)) { this._parent.Units = unitsCasted; return; } } if ((this._parent.SVC == null)) { IScaledValueConfig sVCCasted = item.As <IScaledValueConfig>(); if ((sVCCasted != null)) { this._parent.SVC = sVCCasted; return; } } if ((this._parent.Min == null)) { IAnalogueValue minCasted = item.As <IAnalogueValue>(); if ((minCasted != null)) { this._parent.Min = minCasted; return; } } if ((this._parent.Max == null)) { IAnalogueValue maxCasted = item.As <IAnalogueValue>(); if ((maxCasted != null)) { this._parent.Max = maxCasted; return; } } }
/// <summary> /// Create new Unit, WriteUnit permission required, Draft /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='unit'> /// The entity to create /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task <object> PostAsyncByunitAsync(this IUnits operations, CreateUnitDto unit, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.PostAsyncByunitWithHttpMessagesAsync(unit, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get all Units /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orderby'> /// <p><a href='#queryoptions'>Sorts</a> the result in /// ascending order by the supplied property.</p><p>Valid values /// are: <strong>UnitId</strong> (default), /// <strong>Name</strong>.</p><p>Note: /// <strong>orderby</strong> and /// <strong>orderbydesc</strong> are mutually exclusive.</p> /// </param> /// <param name='orderbydesc'> /// <p><a href='#queryoptions'>Sorts</a> the result in /// descending order by the supplied property.</p><p>Valid values /// are: <strong>UnitId</strong> (default), /// <strong>Name</strong>.</p><p>Note: /// <strong>orderby</strong> and /// <strong>orderbydesc</strong> are mutually exclusive.</p> /// </param> /// <param name='accountAccountId'> /// <p><a href="#queryoptions">Filters</a> the result by /// Account.AccountId using the supplied operation and /// value.</p><p>Valid operations are: /// <strong>eq(int)</strong></p> /// </param> /// <param name='unitTypeUnitTypeId'> /// <p><a href="#queryoptions">Filters</a> the result by /// UnitType.UnitTypeId using the supplied operation and /// value.</p><p>Valid operations are: /// <strong>eq(int)</strong></p> /// </param> /// <param name='top'> /// <a href="#queryoptions">Query paging</a> Returns the maximum /// number of entities. Default and max value is 10000 /// </param> /// <param name='skip'> /// <a href="#queryoptions">Query paging</a> Skips this number of /// entities /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task <object> GetCollectionAsyncByqueryOptionsAsync(this IUnits operations, string orderby = "UnitId", string orderbydesc = default(string), string accountAccountId = default(string), string unitTypeUnitTypeId = default(string), int?top = 10000, int?skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.GetCollectionAsyncByqueryOptionsWithHttpMessagesAsync(orderby, orderbydesc, accountAccountId, unitTypeUnitTypeId, top, skip, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
public Thousands(IUnits units) { _units = units; }
public MoveCommand(IUnits unit, int x, int y) { _unit = unit; _x = x; _y = y; }
/// <summary> /// Get all Units /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orderby'> /// <p><a href='#queryoptions'>Sorts</a> the result in /// ascending order by the supplied property.</p><p>Valid values /// are: <strong>UnitId</strong> (default), /// <strong>Name</strong>.</p><p>Note: /// <strong>orderby</strong> and /// <strong>orderbydesc</strong> are mutually exclusive.</p> /// </param> /// <param name='orderbydesc'> /// <p><a href='#queryoptions'>Sorts</a> the result in /// descending order by the supplied property.</p><p>Valid values /// are: <strong>UnitId</strong> (default), /// <strong>Name</strong>.</p><p>Note: /// <strong>orderby</strong> and /// <strong>orderbydesc</strong> are mutually exclusive.</p> /// </param> /// <param name='accountAccountId'> /// <p><a href="#queryoptions">Filters</a> the result by /// Account.AccountId using the supplied operation and /// value.</p><p>Valid operations are: /// <strong>eq(int)</strong></p> /// </param> /// <param name='unitTypeUnitTypeId'> /// <p><a href="#queryoptions">Filters</a> the result by /// UnitType.UnitTypeId using the supplied operation and /// value.</p><p>Valid operations are: /// <strong>eq(int)</strong></p> /// </param> /// <param name='top'> /// <a href="#queryoptions">Query paging</a> Returns the maximum /// number of entities. Default and max value is 10000 /// </param> /// <param name='skip'> /// <a href="#queryoptions">Query paging</a> Skips this number of /// entities /// </param> public static object GetCollectionAsyncByqueryOptions(this IUnits operations, string orderby = "UnitId", string orderbydesc = default(string), string accountAccountId = default(string), string unitTypeUnitTypeId = default(string), int?top = 10000, int?skip = default(int?)) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IUnits)s).GetCollectionAsyncByqueryOptionsAsync(orderby, orderbydesc, accountAccountId, unitTypeUnitTypeId, top, skip), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
public GatherCommand(IUnits unit) { _unit = unit; }
public void Attack(IUnits units, float ATK) => units.SetDamage(ATK, MathOfUnits.AttackType.Magick);
/// <summary> /// Update a Unit, WriteUnit permission required, Draft /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// The id the entity to update /// </param> /// <param name='unit'> /// The entity to update /// </param> public static object PatchAsyncByidunit(this IUnits operations, int id, EditUnitDto unit) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IUnits)s).PatchAsyncByidunitAsync(id, unit), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Add or replace Unit Image by UnitId, draft /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// Id of the unit entity /// </param> /// <param name='file'> /// The image file to upload /// </param> public static object PutImageAsyncByidfile(this IUnits operations, int id, System.IO.Stream file) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IUnits)s).PutImageAsyncByidfileAsync(id, file), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
public void SetUnit(IUnits newUnit) => _unit = newUnit;
/// <summary> /// Get the alarm configurations for an alarmtype and unit /// (Draft) /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// The id of the Unit /// </param> public static object GetAlarmConfigurationAsyncByid(this IUnits operations, int id) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IUnits)s).GetAlarmConfigurationAsyncByidAsync(id), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Deletes the tag reference to the unit and deletes the Tag if it's not /// references by any unit, Draft /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// The id of the entity to delete /// </param> /// <param name='tag'> /// The tag text to delete /// </param> public static object DeleteTagAsyncByidtag(this IUnits operations, int id, string tag) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IUnits)s).DeleteTagAsyncByidtagAsync(id, tag), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
//after Save For Grid Data public List <PRDChemProdReqItem> GetTransactionItemList(long _TransactionID, string _IssueFrom) { using (var context = new BLC_DEVEntities()) { var StockResult = (from p in context.INV_ChemStockSupplier where p.StoreID.ToString() == _IssueFrom group p by new { //p.StoreID, p.SupplierID, p.PackSize, p.ItemID, p.SizeUnit, p.UnitID } into g select new { TransectionID = g.Max(p => p.TransectionID), //StoreID = g.Where(p => p.TransectionID == g.Max(q => q.TransectionID)).Select(x => x.StoreID).FirstOrDefault(), ItemID = g.Where(p => p.TransectionID == g.Max(q => q.TransectionID)).Select(x => x.ItemID).FirstOrDefault(), SupplierID = g.Where(p => p.TransectionID == g.Max(q => q.TransectionID)).Select(x => x.SupplierID).FirstOrDefault(), //UnitID = g.Where(p => p.TransectionID == g.Max(q => q.TransectionID)).Select(x => x.UnitID).FirstOrDefault(), PackSize = g.Where(p => p.TransectionID == g.Max(q => q.TransectionID)).Select(x => x.PackSize).FirstOrDefault(), SizeUnit = g.Where(p => p.TransectionID == g.Max(q => q.TransectionID)).Select(x => x.SizeUnit).FirstOrDefault(), PackQty = g.Where(p => p.TransectionID == g.Max(q => q.TransectionID)).Select(x => x.PackClosingQty).FirstOrDefault(), ClosingQty = g.Where(p => p.TransectionID == g.Max(q => q.TransectionID)).Select(x => x.ClosingQty).FirstOrDefault(), StockUnit = g.Where(p => p.TransectionID == g.Max(q => q.TransectionID)).Select(x => x.UnitID).FirstOrDefault() }); var Data = (from i in context.INV_StoreTransItem where i.TransactionID == _TransactionID // Stock Size from s in StockResult.Where(x => x.ItemID == i.ItemID && x.PackSize == i.PackSize && x.SizeUnit == i.SizeUnit && x.SupplierID == i.SupplierID).DefaultIfEmpty() join si in context.Sys_Size on(s == null ? null : s.PackSize) equals si.SizeID into StockSize from si in StockSize.DefaultIfEmpty() join siu in context.Sys_Unit on(s == null ? null : s.SizeUnit) equals siu.UnitID into StockSizeUnit from siu in StockSizeUnit.DefaultIfEmpty() join su in context.Sys_Unit on(s == null ? null : s.StockUnit) equals su.UnitID into StockUnit from su in StockUnit.DefaultIfEmpty() // Stock Size join it in context.Sys_ChemicalItem on(i == null ? null : i.ItemID) equals it.ItemID into Chemicals from it in Chemicals.DefaultIfEmpty() join sup in context.Sys_Supplier on(i == null ? null : i.SupplierID) equals sup.SupplierID into Suppliers from sup in Suppliers.DefaultIfEmpty() join iu in context.Sys_Unit on(i == null ? null : i.TransactionUnit) equals iu.UnitID into IUnits from iu in IUnits.DefaultIfEmpty() join issuesize in context.Sys_Size on(i == null ? null : i.PackSize) equals issuesize.SizeID into IssueSizes from issuesize in IssueSizes.DefaultIfEmpty() join issuesizeunit in context.Sys_Unit on(i == null ? null : i.SizeUnit) equals issuesizeunit.UnitID into IssueSizeUnit from issuesizeunit in IssueSizeUnit.DefaultIfEmpty() orderby(it == null ? null : it.ItemName) select new PRDChemProdReqItem { TransItemID = i.TransItemID, ItemID = i.ItemID, ItemName = (it == null ? null : it.ItemName), SupplierID = i.SupplierID, SupplierName = (sup == null ? null : sup.SupplierName), PackSize = (s == null ? 0 : s.PackSize), PackSizeName = (si == null ? null : si.SizeName), SizeUnit = (s == null ? 0 : s.SizeUnit), SizeUnitName = (siu == null ? null : siu.UnitName), PackQty = (s == null ? 0 : (Int32)(s.PackQty)), StockQty = (s == null ? 0 : s.ClosingQty), StockUnit = (s == null ? 0 : s.StockUnit), StockUnitName = (su == null ? null : su.UnitName), IssuePackSize = i.PackSize, IssuePackSizeName = (issuesize == null ? null : issuesize.SizeName), IssueSizeUnit = i.SizeUnit, IssueSizeUnitName = (issuesizeunit == null ? null : issuesizeunit.UnitName), IssuePackQty = i.PackQty, IssueQty = i.TransactionQty, IssueUnitName = (iu == null ? null : iu.UnitName) }).ToList(); return(Data); } }
public NumberSpeller(IThousands thousands) { _thousands = thousands; Units = _thousands.Units; }
/// <summary> /// Creates (or overwrites) the alarm configuration for an alarmtype and unit /// (Draft) /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// The id of the Unit /// </param> /// <param name='key'> /// Configuration key /// </param> /// <param name='value'> /// Configuration value /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task <object> AlarmConfigurationAsyncByidkeyvalueAsync(this IUnits operations, int id, string key, string value = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.AlarmConfigurationAsyncByidkeyvalueWithHttpMessagesAsync(id, key, value, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }