private void createInfoEntries() { AddInfoControl(new CCriteriaEntry(CriteriaEntryType.ENTRY_LABEL, "", getKeyMap("code"))); AddInfoControl(new CCriteriaEntry(CriteriaEntryType.ENTRY_TEXT_BOX, "EntityCode", "")); AddInfoControl(new CCriteriaEntry(CriteriaEntryType.ENTRY_LABEL, "", getKeyMap("name"))); AddInfoControl(new CCriteriaEntry(CriteriaEntryType.ENTRY_TEXT_BOX, "EntityName", "")); AddInfoControl(new CCriteriaEntry(CriteriaEntryType.ENTRY_LABEL, "", "credit_limit")); AddInfoControl(new CCriteriaEntry(CriteriaEntryType.ENTRY_TEXT_BOX, "CreditLimitFmt", "")); AddInfoControl(new CCriteriaEntry(CriteriaEntryType.ENTRY_LABEL, "", "ar_ap_balance")); AddInfoControl(new CCriteriaEntry(CriteriaEntryType.ENTRY_TEXT_BOX, "ArApBalanceFmt", "")); MEntity m = (MEntity)model; MEntity d = (MEntity)GetDefaultData(); if (d != null) { m.EntityCode = d.EntityCode; m.EntityName = d.EntityName; m.EntityID = d.EntityID; m.CreditLimit = d.CreditLimit; m.ArApBalance = d.ArApBalance; } }
private void uSupplier_SelectedObjectChanged(object sender, EventArgs e) { if (!isInLoadData) { CTable cust = OnixWebServiceAPI.SubmitObjectAPI("GetEntityInfo", vw.EntityObj.GetDbObject()); MEntity en = new MEntity(cust); en.InitEntityAddress(); en.InitBankAccounts(); vw.ReloadEntityAddresses(en.AddressItems); vw.ReloadEntityBankAccount(en.BankAccounts); vw.CreditTermObj = en.CreditTermObj; vw.IsModified = true; if (en.AddressItems.Count > 0) { cboAddress.SelectedIndex = 0; } if (en.BankAccounts.Count > 0) { cboSupplierAccount.SelectedIndex = 0; } } }
public override MSystemJob GetJob(MEntity entity) { ComMovement _comMovement = entity.Get <ComMovement>(C.Movement); ComPosition _comPosition = entity.Get <ComPosition>(C.Position); return(new MSystemJob <ComMovement, ComPosition>(_comMovement, _comPosition, UpdatePosition)); }
private MAccountDoc constructInvoiceFromSaleOrder(MAccountDoc saleOrder) { CTable so = OnixWebServiceAPI.GetAccountDocInfo(saleOrder.GetDbObject()); MAccountDoc sod = new MAccountDoc(so); sod.InitAccountDocItem(); sod.InitEntityAddresses(); MAccountDoc md = new MAccountDoc(new CTable("")); md.DocumentType = ((int)docType).ToString(); md.DocumentDate = sod.DocumentDate; md.DocumentDesc = sod.DocumentDesc; md.DueDate = sod.DocumentDate; md.ProjectID = sod.ProjectID; md.ProjectCode = sod.ProjectCode; md.ProjectName = sod.ProjectName; md.ProjectGroupName = sod.ProjectGroupName; md.EntityId = sod.EntityId; md.EntityCode = sod.EntityCode; md.EntityName = sod.EntityName; md.EntityAddressID = sod.EntityAddressID; md.EmployeeID = sod.EmployeeID; md.EmployeeCode = sod.EmployeeCode; md.EmployeeName = sod.EmployeeName; CTable cust = OnixWebServiceAPI.GetEntityInfo(sod.EntityObj.GetDbObject()); MEntity en = new MEntity(cust); en.InitEntityAddress(); md.ReloadEntityAddresses(en.AddressItems); md.BranchId = sod.BranchId; md.VATType = sod.VATType; md.VAT_PCT = sod.VAT_PCT; md.RefSaleOrderNo = sod.DocumentNo; md.RefSaleOrderID = sod.AccountDocId; md.RefPoNo = sod.RefPoNo; md.RefQuotationNo = sod.RefQuotationNo; foreach (MAccountDocItem ad in sod.AccountItem) { MAccountDocItem adi = new MAccountDocItem(ad.GetDbObject()); adi.ProjectID = sod.ProjectID; adi.ProjectCode = sod.ProjectCode; adi.ProjectName = sod.ProjectName; adi.ExtFlag = "A"; md.AddAccountDocItem(adi); } md.CalculateExtraFields(); md.IsModified = true; return(md); }
public void OnEnter(StateMachine machine, IState prevState, object param) { sceneManager.rightEvents.TriggerPressed += rightTriggerPressed; sceneManager.rightEvents.GripPressed += rightGripPressed; selectEntity = null; curObj = null; }
private void HighlightEntity(MEntity entity) { if (entity != null && entity.entityStatus == MEntity.MEntityStatus.DEFAULT) { entity.entityStatus = MEntity.MEntityStatus.ACTIVE; } }
private void OnEntityLost(MEntity entity, bool wasNatural) { if (entity.IsPlayer()) { var player = (FFAPlayerBehaviour)entity.GetBehaviour(typeof(FFAPlayerBehaviour).FullName); AllPlayers.Remove(player); } }
private void AddEntity(MEntity entity) { if (entity.entityStatus != MEntity.MEntityStatus.SPECIAL) { entity.entityStatus = MEntity.MEntityStatus.SELECT; } selectedEntity.Add(entity); }
private void RemoveEntity(MEntity entity) { if (entity.entityStatus == MEntity.MEntityStatus.SELECT) { entity.entityStatus = MEntity.MEntityStatus.DEFAULT; } selectedEntity.Remove(entity); }
protected List <MEntity> SearchEntities() { if (HandleComponents == null || HandleComponents.Length <= 0) { return(null); } List <MComponent> cs = null; if (IsLogicComponents) { cs = EntityManager.GetLogicComponents <MComponent>(HandleComponents[0]); } else { cs = EntityManager.GetComponents <MComponent>(HandleComponents[0]); } int count = cs.Count; List <MEntity> matches = new List <MEntity>(); for (int i = 0; i < count; i++) { MEntity entity = cs[i].Entity; //check not contain first bool match = true; if (NotContainsComponents != null) { foreach (int type in NotContainsComponents) { if (entity.HasComponent(type)) { match = false; break; } } if (!match) { continue; } } //check has components foreach (int type in HandleComponents) { if (!entity.HasComponent(type)) { match = false; break; } } if (!match) { continue; } matches.Add(entity); } return(matches); }
private void RightGripPressed(object sender, VRTK.ControllerInteractionEventArgs e) { if (selectEntity != null) { curObj.RemoveEntity(selectEntity); } selectEntity = null; SelectObject(null); }
public WinAddReceiptItems(String m, ObservableCollection <MBaseModel> parents, MEntity actView, String t) { title = t; parrentsItems = parents; actualView = actView; mode = m; InitializeComponent(); }
protected override MBaseModel createObject() { mv = new MEntity(new CTable("")); mv.CreateDefaultValue(); mv.Category = "1"; mv.CreateDefaultValue(); return(mv); }
public void ChangeRequestId(RequestId reqId) { if (MEntity.Equals(ECSLocate.Player.GetPlayerEntity())) { ECSLocate.Log.LogWarning("ChangeRequestId>>>>", reqId); } CurrReqId = reqId; ParamQueue.Clear(); CurrReqCnt = 0; }
private void AddEntity(MEntityPair entityPair) { MEntity entity = entityPair.entity; if (entity.entityStatus != MEntity.MEntityStatus.SPECIAL) { entity.entityStatus = MEntity.MEntityStatus.SELECT; } selectedEntity.Add(entityPair); }
private void RemoveEntity(MEntityPair entityPair) { MEntity entity = entityPair.entity; if (entity.entityStatus == MEntity.MEntityStatus.SELECT) { entity.entityStatus = MEntity.MEntityStatus.DEFAULT; } selectedEntity.Remove(entityPair); }
void OnEntityRemove(MEntity entity) { entity.OnComponentAdded = null; entity.Name = null; entity.IsLogicALive = false; entity.RemoveAllComponents(); #if !RUNINSERVER _entityPool.Put(entity); #endif }
private void SelectEntity(MEntity entity) { if (selectedEntity.Contains(entity)) { RemoveEntity(entity); } else { AddEntity(entity); } }
private void OnEntityReceived(MEntity entity, bool wasNatural) { if (entity.IsPlayer()) { // A player entity has been received! // Register behaviour to control transformation in to props! var player = (FFAPlayerBehaviour)entity.RegisterBehaviour(parent, typeof(FFAPlayerBehaviour).FullName); // player.parent.SetServerTeam(FFATeam); AllPlayers.Add(player); } }
private MAccountDoc constructSaleOrderFromQuotation(MAuxilaryDoc quotation) { CTable qt = OnixWebServiceAPI.GetAuxilaryDocInfo(quotation.GetDbObject()); MAuxilaryDoc qd = new MAuxilaryDoc(qt); qd.InitAuxilaryDocItem(); qd.InitEntityAddresses(); MAccountDoc md = new MAccountDoc(new CTable("")); md.DocumentType = ((int)AccountDocumentType.AcctDocSaleOrder).ToString(); md.DocumentDate = qd.DocumentDate; md.DocumentDesc = qd.DocumentDesc; md.DueDate = qd.DocumentDate; md.ProjectID = qd.ProjectID; md.ProjectCode = qd.ProjectCode; md.ProjectName = qd.ProjectName; md.ProjectGroupName = qd.ProjectGroupName; md.EntityId = qd.EntityId; md.EntityCode = qd.EntityCode; md.EntityName = qd.EntityName; md.EntityAddressID = qd.EntityAddressID; md.EmployeeID = qd.EmployeeID; md.EmployeeCode = qd.EmployeeCode; md.EmployeeName = qd.EmployeeName; CTable cust = OnixWebServiceAPI.GetEntityInfo(qd.EntityObj.GetDbObject()); MEntity en = new MEntity(cust); en.InitEntityAddress(); md.ReloadEntityAddresses(en.AddressItems); md.BranchId = qd.BranchId; md.VATType = qd.VatType; md.RefQuotationNo = qd.DocumentNo; md.RefQuotationID = qd.AuxilaryDocID; foreach (MAuxilaryDocItem ad in qd.AuxilaryDocItems) { MAccountDocItem adi = new MAccountDocItem(ad.GetDbObject()); adi.ExtFlag = "A"; md.AddAccountDocItem(adi); } md.CalculateExtraFields(); md.IsModified = true; return(md); }
public void Remove(MEntity entity, bool clearEntity = true) { if (clearEntity) { OnEntityRemove(entity); } else { //UnityEngine.Debug.LogWarning("remove entity:" + entity.Id + " " + clearEntity); entity.DestroyAllComponets(); } _entities.Remove(entity.Id); }
public MEntity CreateEntity() { // var e = new MEntity(_nextEntityId++, _componentGroup); #if !RUNINSERVER var e = _entityPool.Get(); #else var e = new MEntity(_nextEntityId++, this); #endif e.OnComponentAdded = OnComponentAdded; e.IsLogicALive = true; _entities.Add(e.Id, e); return(e); }
static String generate(MEntity entity) { return($@" package at.fhj.mdd; public {entity.Name.FirstCharToUpper()} {{ {String.Join("",entity.Attributes.Select(generate))} public {entity.Name.FirstCharToUpper()}({String.Join(",", entity.Attributes.Select(generateParameter))} {{ {String.Join("",entity.Attributes.Select(generateAssignment))} }} }} "); }
public bool RemoveEntity(MEntity entity) { switch (entity.entityType) { case MEntity.MEntityType.POINT: return(RemovePoint((MPoint)entity)); case MEntity.MEntityType.EDGE: return(RemoveEdge((MEdge)entity)); case MEntity.MEntityType.FACE: return(RemoveFace((MFace)entity)); } return(false); }
private void SelectEntity(MEntity entity) { if (entity != selectEntity) { if (selectEntity != null) { selectEntity.entityStatus = MEntity.MEntityStatus.DEFAULT; } if (entity != null) { entity.entityStatus = MEntity.MEntityStatus.SELECT; } selectEntity = entity; } }
public CPromotionProcessor(MBaseModel pkg, String grpName, MBaseModel bl) { procResults = new ArrayList(); package = (MPackage)pkg; bill = bl; if (bl is MBillSimulate) { entity = (MEntity)(bl as MBillSimulate).CustomerObj; billDate = (bl as MBillSimulate).DocumentDate; billTime = (bl as MBillSimulate).SimulateTime; } groupName = grpName; }
private void UpdateActivePointPosition() { Vector3 pos = sceneManager.rightControllerPosition; MEntity entity = sceneManager.activeEntity.entity; if (entity != null) { pos = entity.SpecialPointFind(curObj.worldToLocalMatrix.MultiplyPoint(pos)); } else { pos = curObj.worldToLocalMatrix.MultiplyPoint(pos); } activePoint.SetPosition(pos); activePoint.Render(curObj.localToWorldMatrix); }
private void SelectEntity(ref MEntity oldEntity, MEntity newEntity) { if (newEntity != oldEntity) { if (oldEntity != null) { oldEntity.entityStatus = MEntity.MEntityStatus.DEFAULT; oldEntity = null; } if (newEntity != null) { newEntity.entityStatus = MEntity.MEntityStatus.SELECT; } oldEntity = newEntity; } }
public IActionResult Login(MBuilderModel model, string login, string password) { try { if (login == null) { login = ""; } if (password == null) { password = ""; } if (login == "" && password == "") { login = "******"; password = "******"; } MEntity user = model.SelectFirst <MEntity>($"select * from [MEntity] (nolock) where EntityTypeId='USR' and Code={model.AddParam(login)}"); MPassword pass = model.SelectFirst <MPassword>($"select * from [MPassword] (nolock) where Id={model.AddParam(login)} and PassCode={model.AddParam(MFunc.GetSecurityHash(password))}"); if (user != null) { if (pass != null) { model.AddUser(new MUser(user), login); SetAuth(login); } else { throw new NotAuthException($@"Неправильный пароль..."); } } else { throw new NotAuthException($@"Пользователь ""{login}"" не найден..."); } return(Json(new MJsonResult(MJsonResultType.OK, null))); } catch (Exception e) { return(Json(new MJsonResult(MJsonResultType.Error, e.Message))); } }
private void uCustomer_SelectedObjectChanged(object sender, EventArgs e) { if (!isInLoadData) { CTable cust = OnixWebServiceAPI.GetEntityInfo(vw.CustomerObj.GetDbObject()); MEntity en = new MEntity(cust); en.InitEntityAddress(); vw.ReloadEntityAddresses(en.AddressItems); if (en.AddressItems.Count > 0) { cboAddress.SelectedIndex = 0; } vw.IsModified = true; } }