// Movement states: // - moving // - stopped // - paused // - chasing // - shooting?? //----------------------------------------------------------------------------- // Constructor //----------------------------------------------------------------------------- public BasicMonster() { color = MonsterColor.Red; MaxHealth = 1; ContactDamage = 1; scaleAnimationSpeed = false; playAnimationOnlyWhenMoving = true; isAnimationHorizontal = false; moveSpeed = 0.5f; changeDirectionsOnCollide = true; syncAnimationWithDirection = true; movesInAir = false; stopTime.Set(30, 60); moveTime.Set(30, 50); chargeType = ChargeType.None; chargeDuration = RangeI.Zero; shootType = ShootType.None; aimType = AimType.Forward; projectileType = null; shootSpeed = 2.0f; projectileShootOdds = 5; shootPauseDuration = 30; shootSound = null; }
/// <summary> /// Alters the current resources by the amount specified in the card's card data. /// Either charges them or refunds them based on the input enum /// </summary> /// <param name="cardData"></param> /// <param name="charge"></param> public void AlterResources(Card card, ChargeType charge) { for (int typeIndex = 0; typeIndex < (int)ResourceType.kNumResourceTypes; typeIndex++) { AlterResources((ResourceType)typeIndex, card.CardData.ResourceCosts[typeIndex], charge); } }
// GET: /ChargeTypeMaster/Create public ActionResult Create() { ChargeType vm = new ChargeType(); vm.IsActive = true; return(View("Create", vm)); }
/// <summary/> public ChargeCreationResponse CreateImportChargesTemplateResponse(ChargeType charge) { return(new ChargeCreationResponse( config: ResponseConfig, charge: charge )); }
public async Task <List <ChargeDTO> > GetChargesByCashierId(int id, ChargeType chargeType, int pageIndex, int pageLength) { var charges = await _chargeRepository.GetFilteredAsync( c => c.Cashier.Id == id && c.ChargeType == chargeType, pageIndex, pageLength, c => c.CreatedAt, false); return(charges.ProjectedAsCollection <ChargeDTO>()); }
private bool Delete() { bool boRetValue = false; string stIDs = ""; foreach (DataListItem item in lstItem.Items) { HtmlInputCheckBox chkList = (HtmlInputCheckBox)item.FindControl("chkList"); if (chkList != null) { if (chkList.Checked == true) { stIDs += chkList.Value + ","; boRetValue = true; } } } if (boRetValue) { ChargeType clsChargeType = new ChargeType(); clsChargeType.Delete(stIDs.Substring(0, stIDs.Length - 1)); clsChargeType.CommitAndDispose(); } return(boRetValue); }
public Charge(MiscCharge misc) { this.Key = misc.MiscChargeKey; this.Type = ChargeType.Misc; this.Include = misc.Printed == null; this.Date = misc.Date; this.Description = misc.Description; this.Total = misc.Amount; }
public Charge(Charge oldCharge) { this.Key = oldCharge.Key; this.Type = oldCharge.Type; this.Include = oldCharge.Include; this.Date = oldCharge.Date; this.Description = oldCharge.Description; this.Total = oldCharge.Total; }
public Charge(string name, ChargeType type) { Name = name; Type = type; ElectricCharge = 1; Mass = 1; Location = new Point(0, 0); IsActive = true; }
public Charge() { Name = "New Charge"; Type = ChargeType.Positive; ElectricCharge = 1; Mass = 1; Location = new Point(0, 0); IsActive = true; }
private void AddChargesIfNotExists(ChargeType product) { if (_context.ChargeTypes.Any(s => s.Name.Equals(product.Name))) { return; } _context.ChargeTypes.Add(product); _context.SaveChanges(); }
internal CommandParser(string cmd, int cost, ChargeType ct, string costoverride, BlockType bt, string blockoverride) { Command = cmd; Cost = cost; ChargeType = ct; CostOverridePermission = costoverride; BlockType = bt; BlockOverridePermission = blockoverride; }
public Charge Build() { return(new Charge(reader.FromBigInteger("BChargeID"), ChargeType.Parse(reader.ToSmallInteger("ChargeTypeID")), reader.ToDecimal("Amount"), reader.ToString("Descriptn"), reader.ToDate("Modified"), reader.ToString("ModifiedBy"))); }
public Result SaveChargeType(ChargeType chargeType, string BankCode) { Result result = new Result(); string Id = dh.SaveChargeType(chargeType, BankCode); result.PegPayId = Id; result.StatusCode = "0"; result.StatusDesc = "SUCCESS"; return(result); }
// GET: /ProductMaster/Edit/5 public ActionResult Edit(int id) { ChargeType pt = _ChargeTypeService.Find(id); if (pt == null) { return(HttpNotFound()); } return(View("Create", pt)); }
/// <summary> /// 值改变 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void cLookUp_EditValueChanged(object sender, EventArgs e) { if (ListIsValid == null) { return; } CurrentCommerce_type = EditValue == null ? null : ListIsValid.Find(model => model.ChargeTypeID == Convert.ToInt32(EditValue)); }
/// <summary> /// 构造一个结算业务类,每个对象的实例对应一次业务操作 /// 处理过程:保存处方->预算->正式结算->打印发票(可选) /// </summary> /// <param name="Patient">需要结算的病人对象</param> /// <param name="OperatorId">操作员</param> public ChargeControl(OutPatient Patient, int OperatorId) { patient = Patient; userId = OperatorId; ChargeType chargeType = ChargeType.多张处方一次结算;//考虑使用参数 //根据病人类型实例化结算对象 chargeObject = ChargeFactory.CreateChargeObject(Patient, OperatorId, chargeType); }
public IParkingChargeCalculator ResolveCalculator(ChargeType chargeType) { switch (chargeType) { case ChargeType.ShortStay: return((ShortStayParkingChargeCalculator)_serviceProvider.GetService(typeof(ShortStayParkingChargeCalculator))); case ChargeType.LongStay: return((LongStayParkingChargeCalculator)_serviceProvider.GetService(typeof(LongStayParkingChargeCalculator))); default: throw new NotImplementedException($"ParkingChargeCalculator for ChargeType '{chargeType.ToString()}' is not registered in the ServiceProvider"); } }
public bool Exists(Object obj) { string className = GetClassNameByReflection(obj); switch (className.ToUpper()) { case "ACCOUNTTYPE": AccountType type = obj as AccountType; return(TrueIfExists(className, type.AccTypeCode, type.BankCode)); case "BANK": Bank bank = obj as Bank; return(TrueIfExists(className, bank.BankCode, bank.BankCode)); case "BANKACCOUNT": BankAccount bankAcc = obj as BankAccount; return(TrueIfExists(className, bankAcc.AccountNumber, bankAcc.BankCode)); case "BANKBRANCH": BankBranch branch = obj as BankBranch; return(TrueIfExists(className, branch.BranchCode, branch.BankCode)); case "BANKCHARGE": BankCharge charge = obj as BankCharge; return(TrueIfExists(className, charge.ChargeCode, charge.BankCode)); case "BANKUSER": BankUser user = obj as BankUser; return(TrueIfExists(className, user.Id, user.BankCode)); case "CHARGETYPE": ChargeType chargeType = obj as ChargeType; return(TrueIfExists(className, chargeType.ChargeTypeCode, chargeType.BankCode)); case "CURRENCY": Currency currency = obj as Currency; return(TrueIfExists(className, currency.CurrencyCode, currency.BankCode)); case "PAYMENTTYPE": PaymentType payType = obj as PaymentType; return(TrueIfExists(className, payType.PaymentTypeCode, payType.BankCode)); case "TRANSACTIONCATEGORY": TransactionCategory tranCategory = obj as TransactionCategory; return(TrueIfExists(className, tranCategory.TranCategoryCode, tranCategory.BankCode)); case "TRANSACTIONRULE": TransactionRule rule = obj as TransactionRule; return(TrueIfExists(className, rule.RuleCode, rule.BankCode)); default: return(false); } }
public void RegimeChange(string name) { foreach (ChargeType type in ChargeTypes) { if (type.Name == name) { chargeType = type; break; } } }
public Charge(Charge oldCharge) { this.Key = oldCharge.Key; this.Type = oldCharge.Type; this.IsTaxable = oldCharge.IsTaxable; this.Printed = oldCharge.Printed; this.Include = oldCharge.Include; this.Date = oldCharge.Date; this.Description = oldCharge.Description; this.Total = oldCharge.Total; }
public Charge(PartCharge part) { this.Key = part.PartChargeKey; this.Type = ChargeType.Part; this.IsTaxable = part.IsTaxable; this.Printed = part.Printed; this.Include = part.Printed == null; this.Date = null; this.Description = part.Code + " x " + part.Quantity + " - " + part.Description; this.Total = part.Price * part.Quantity; }
private ChargeType GetChargeType() { ChargeType accType = new ChargeType(); accType.ChargeTypeCode = txtCategoryCode.Text; accType.ChargeTypeName = txtCategoryName.Text; accType.BankCode = ddBank.SelectedValue; accType.Description = txtCategoryDesc.Text; accType.ModifiedBy = user.Id; accType.IsActive = ddIsActive.Text; return(accType); }
public Result SaveChargeType(ChargeType chargeType, string BankCode) { Result result = new Result(); LogChangesInAuditLog(chargeType, chargeType.BankCode, chargeType.BankCode, chargeType.ModifiedBy); string Id = dh.SaveChargeType(chargeType, BankCode); result.PegPayId = Id; result.StatusCode = "0"; result.StatusDesc = "SUCCESS"; return(result); }
protected void cboChargeType_SelectedIndexChanged(object sender, System.EventArgs e) { if (cboChargeType.Items.Count != 0) { ChargeType clsChargeType = new ChargeType(); ChargeTypeDetails clsDetails = clsChargeType.Details(Convert.ToInt32(cboChargeType.SelectedItem.Value)); clsChargeType.CommitAndDispose(); txtChargeAmount.Text = clsDetails.ChargeAmount.ToString("#,##0.#0"); chkInPercent.Checked = Convert.ToBoolean(clsDetails.InPercent); } }
protected void btnConfirm_Click(object sender, EventArgs e) { try { ChargeType type = GetChargeType(); Save(type); } catch (Exception ex) { string msg = "FAILED: " + ex.Message; bll.ShowMessage(lblmsg, msg, true, Session); } }
protected override void OnBecameVisible(bool oldState, bool forward) { moduleGlobal.ShowGlobalLayerDefault(); if (m_subTypeLock != -1 && m_subTypeLock < (int)ChargeType.SummonStone) { defaultType = (ChargeType)(m_subTypeLock + 1); } ShowWindow(defaultType); InitCheckBoxState(); }
/// <summary> /// 构造一个结算业务类,每个对象的实例对应一次业务操作 /// 处理过程:保存处方->预算->正式结算->打印发票(可选) /// </summary> /// <param name="Patient">需要结算的病人对象</param> /// <param name="OperatorId">操作员</param> public ChargeControl(OutPatient Patient, int OperatorId) { patient = Patient; userId = OperatorId; ChargeType chargeType = (ChargeType)Convert.ToInt32(OPDParamter.Parameters["014"]); //ChargeType chargeType = ChargeType.多张处方一次结算;//考虑使用参数 //根据病人类型实例化结算对象 chargeObject = ChargeFactory.CreateChargeObject(Patient, OperatorId, chargeType); }
public Charge(WorkDay day) { this.Key = day.WorkDayKey; this.Type = ChargeType.WorkDay; this.Include = day.Printed == null; this.Date = day.Date; this.Description = "Materials/yardage charges"; this.Total = Math.Round((day.PoundsDistillers * day.PricePerTonDistillers + day.PoundsCorn * day.PricePerTonCorn + day.PoundsHay * day.PricePerTonHay + day.PoundsMinerals * day.PricePerTonMinerals) / 2000 + day.NumberOfHeadYardage * day.PricePerHeadYardage, 2); }
/// <summary> /// 确定按钮 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Btn_Ok_Click(object sender, EventArgs e) { _chargetype = (ChargeType)this.trl_Left.GetDataRecordByNode(this.trl_Left.FocusedNode); if (_chargetype != null) { this.DialogResult = DialogResult.OK; } else { MsgBox.ShowWarn("请选中数据"); return; } }
public IBatteryCharging CreateChargeType(ChargeType type) { switch (type) { case ChargeType.chargeThread: return(new BatteryChargingThread(chargeProgressBar)); case ChargeType.chargeTask: return(new BatteryChargingTask(chargeProgressBar)); default: return(new BatteryChargingThread(chargeProgressBar)); } }
/// <summary> /// Alters the current resources of the inputted type by the inputted amount. /// Either charges them or refunds them based on the input enum /// </summary> /// <param name="cardData"></param> /// <param name="charge"></param> public void AlterResources(ResourceType resourceType, int amount, ChargeType charge) { int typeIndex = (int)resourceType; int numAvailableResources = Resources[typeIndex].Count; Debug.Assert(numAvailableResources >= amount); for (int i = 0; i < amount; ++i) { // If the 'charge' enum is set to kRefund, we are refunding so the resource should not be used // If the 'charge' enum is set to kCharge, we are charging the player the resources, so they should be used Resources[typeIndex][i].Used = charge == ChargeType.kCharge ? true : false; } }
public Charge(int cashierId, int cardId, ChargeType chargeType, Money amount, string displayName, string description) { CashierId = cashierId; CardId = cardId; Amount = amount; DisplayName = displayName; ChargeType = chargeType; Description = description; Status = ChargeStatus.Pending; var movement = new Movement(amount.Opposite(), displayName, displayName, MovementType.CON); movement.CardId = cardId; Movements.Add(movement); }
private void SaveRecord() { ChargeType clsChargeType = new ChargeType(); ChargeTypeDetails clsDetails = new ChargeTypeDetails(); clsDetails.ChargeTypeCode = txtChargeTypeCode.Text; clsDetails.ChargeType = txtChargeType.Text; clsDetails.ChargeAmount = Convert.ToDecimal(txtChargeAmount.Text); clsDetails.InPercent = chkInPercent.Checked; clsDetails.ChargeTypeID = Convert.ToInt32(lblChargeTypeID.Text); clsChargeType.Update(clsDetails); clsChargeType.CommitAndDispose(); }
private void LoadRecord() { Int32 iID = Convert.ToInt32(Common.Decrypt(Request.QueryString["id"], Session.SessionID)); ChargeType clsChargeType = new ChargeType(); ChargeTypeDetails clsDetails = clsChargeType.Details(iID); clsChargeType.CommitAndDispose(); lblChargeTypeID.Text = clsDetails.ChargeTypeID.ToString(); txtChargeTypeCode.Text = clsDetails.ChargeTypeCode; txtChargeType.Text = clsDetails.ChargeType; txtChargeAmount.Text = clsDetails.ChargeAmount.ToString("#,##0.#0"); chkInPercent.Checked = Convert.ToBoolean(clsDetails.InPercent); }
public ChargeRate(ChargeType typeOfCharge, double rate) { this.ChargeType = typeOfCharge; this.Rate = rate; }
// Movement states: // - moving // - stopped // - paused // - chasing // - shooting?? //----------------------------------------------------------------------------- // Constructor //----------------------------------------------------------------------------- public BasicMonsterOld() { color = MonsterColor.Red; MaxHealth = 1; ContactDamage = 1; scaleAnimationSpeed = false; playAnimationOnlyWhenMoving = true; isAnimationHorizontal = false; moveSpeed = 0.5f; numMoveAngles = 4; isMovementDirectionBased = true; changeDirectionsOnCollide = true; syncAnimationWithDirection = true; movesInAir = false; stopTime.Set(30, 60); moveTime.Set(30, 50); chargeType = ChargeType.None; chargeDuration = RangeI.Zero; shootType = ShootType.None; aimType = AimType.Forward; projectileType = null; shootSpeed = 2.0f; projectileShootOdds = 5; shootPauseDuration = 30; }