/// <summary> /// 根据项目类别设置不同的分类内容 /// </summary> /// <param name="customType">项目分类</param> /// <returns></returns> protected string[] GetDescriptionFromType(EnumMSCustomType customType, TransTypes trnas) { switch (customType) { case Neusoft.HISFC.Models.Base.EnumMSCustomType.入库: //根据入库类型检索 return(this.privInC3StrCollection); case Neusoft.HISFC.Models.Base.EnumMSCustomType.出库: //根据出库类型检索 return(this.privOutC3StrCollection); case Neusoft.HISFC.Models.Base.EnumMSCustomType.科室: //科室 根据入出库科室选择 if (trnas == TransTypes.Positive) //正交易 取入库科室 { return(this.privInStrCollection); } else //反交易 取出库科室 { return(this.privOutStrCollection); } case Neusoft.HISFC.Models.Base.EnumMSCustomType.调价: return(this.strAdjustCollection); case Neusoft.HISFC.Models.Base.EnumMSCustomType.盘点: //根据盘点盈亏 return(this.strCheckCollection); default: return(new string[] { customType.ToString() }); } }
public void UpdateBalance(TransTypes transactionType, double amount) { CalculateExtraFees(); switch (transactionType) { case TransTypes.DEPOSIT: AccountBalance += (AccountBalance * ExtraFees) - amount; lastPayment = DateTime.Today; break; case TransTypes.WITHDRAW: if (AccountBalance + amount > limitAmount) { MessageBox.Show("Withdraw/Purchase denied. Credit limit reached.", "Insufficient Credit", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { AccountBalance += (AccountBalance * ExtraFees) + amount; } break; } }
public Transaction(int transNumber, Date transDate, Double transAmount, TransTypes transType) { this.transNumber = transNumber; this.transDate = transDate; this.transAmount = transAmount; this.transType = transType; transDescription = "Transaction #: " + transNumber + "\r\nTransaction Type: " + transType + "\r\nTransaction Date: " + transDate + "\r\nTransaction Amount: " + transAmount; }
public Transaction() { transNumber = 0; transDescription = ""; transDate = new Date(); transAmount = 0.0d; transType = TransTypes.UNDEFINED; }
public void SetTransTypes(List <KVPBase> data) { data = data.OrderBy(p => p.Name).ToList(); TransTypes.Clear(); foreach (var item in data) { TransTypes.Add(item); } }
public void SetTransTypes(List <KVPBase> data) { data = data.OrderBy(p => p.Name).ToList(); TransTypes.Clear(); data.ForEach(o => TransTypes.Add(o)); if (LoadTransmissionsComplete != null) { LoadTransmissionsComplete(this, new EventArgs()); } }
internal void Update(IServiseRepository storage) { ClearLists(); Marks.AddRange(storage.Marks); Models.AddRange(storage.Models); BodyTypes.AddRange(storage.BodyTypes); EngineTypes.AddRange(storage.EngineTypes); EngineVolumes.AddRange(storage.EngineVolumes); TransTypes.AddRange(storage.TransTypes); }
/// <summary> /// 设置Fp分类内容 /// </summary> /// <param name="iRow"></param> private void SetTypeItem(int iRow) { EnumMSCustomType customType = EnumMSCustomTypeService.GetEnumFromName(this.neuSpread1_Sheet1.Cells[iRow, 2].Text); TransTypes trans = this.neuSpread1_Sheet1.Cells[iRow, 6].Text.Trim() == "收入" ? TransTypes.Positive : TransTypes.Negative; FarPoint.Win.Spread.CellType.ComboBoxCellType typeItemCellType = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); typeItemCellType.Items = this.GetDescriptionFromType(customType, trans); this.neuSpread1_Sheet1.Cells[iRow, 5].CellType = typeItemCellType; }
public void UpdateBalance(TransTypes transactionType, double amount) { switch (transactionType) { case TransTypes.DEPOSIT: AccountBalance += amount; break; case TransTypes.WITHDRAW: CalculateExtraFees(); AccountBalance = AccountBalance - amount - ExtraFees; break; } }
public void UpdateBalance(TransTypes transactionType, double amount) { CalculateExtraFees(); switch (transactionType) { case TransTypes.DEPOSIT: AccountBalance += DetermineSavings() - ExtraFees + amount; break; case TransTypes.WITHDRAW: AccountBalance += DetermineSavings() - ExtraFees - amount; break; } lastUpdated = DateTime.Today; }
private void ClearLists() { Marks.Clear(); Models.Clear(); EngineTypes.Clear(); EngineVolumes.Clear(); BodyTypes.Clear(); TransTypes.Clear(); }
private void neuSpread1_ComboCloseUp(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e) { if (e.Column == 5) { #region 根据选择的项目获取编码 EnumMSCustomType customType = EnumMSCustomTypeService.GetEnumFromName(this.neuSpread1_Sheet1.Cells[e.Row, 2].Text); TransTypes trans = this.neuSpread1_Sheet1.Cells[e.Row, 6].Text.Trim() == "收入" ? TransTypes.Positive : TransTypes.Negative; string keys = this.neuSpread1_Sheet1.Cells[e.Row, 5].Text; string typeItemID = ""; switch (customType) { case Neusoft.HISFC.Models.Base.EnumMSCustomType.入库: //根据入库类型检索 if (this.hsPrivInC3.ContainsKey(keys)) { typeItemID = this.hsPrivInC3[keys].ToString(); } break; case Neusoft.HISFC.Models.Base.EnumMSCustomType.出库: //根据出库类型检索 if (this.hsPrivOutC3.ContainsKey(keys)) { typeItemID = this.hsPrivOutC3[keys].ToString(); } break; case Neusoft.HISFC.Models.Base.EnumMSCustomType.科室: //科室 根据入出库科室选择 if (trans == TransTypes.Positive) //正交易 取入库科室 { if (this.hsPrivInDept.ContainsKey(keys)) { typeItemID = this.hsPrivInDept[keys].ToString(); } } else //反交易 取出库科室 { if (this.hsPrivOutDept.ContainsKey(keys)) { typeItemID = this.hsPrivOutDept[keys].ToString(); } } break; case Neusoft.HISFC.Models.Base.EnumMSCustomType.调价: typeItemID = keys == this.strAdjustCollection[0] ? "00" : "01"; break; case Neusoft.HISFC.Models.Base.EnumMSCustomType.盘点: //根据盘点盈亏 typeItemID = keys == this.strCheckCollection[0] ? "00" : "01"; break; case EnumMSCustomType.门诊患者领药: typeItemID = "M1"; break; case EnumMSCustomType.门诊患者退药: typeItemID = "M2"; break; case EnumMSCustomType.住院患者领药: typeItemID = "Z1"; break; case EnumMSCustomType.住院患者退药: typeItemID = "Z2"; break; case EnumMSCustomType.小计: typeItemID = "SUB"; break; } this.neuSpread1_Sheet1.Cells[e.Row, 4].Text = typeItemID; #endregion } if (e.Column == 6) //收支标记 { this.SetTypeItem(e.Row); } }
/// <summary> /// 根据项目类别、分类内容获取描述信息 /// </summary> /// <param name="customType">分类</param> /// <param name="typeItem">分类内容</param> /// <returns></returns> protected string GetDescriptionFromTypeItem(EnumMSCustomType customType, string typeItem, TransTypes trans) { switch (customType) { case Neusoft.HISFC.Models.Base.EnumMSCustomType.入库: //根据入库类型检索 case Neusoft.HISFC.Models.Base.EnumMSCustomType.出库: //根据出库类型检索 Neusoft.HISFC.BizLogic.Manager.PowerLevelManager powerManager = new Neusoft.HISFC.BizLogic.Manager.PowerLevelManager(); PowerLevelClass3 pIn3 = powerManager.LoadLevel3ByPrimaryKey(Neusoft.HISFC.Models.Base.EnumMSCustomTypeService.GetNameFromEnum(customType), typeItem); return(customType.ToString() + " - " + pIn3.Name); case Neusoft.HISFC.Models.Base.EnumMSCustomType.科室: //科室 根据入出库科室选择 Neusoft.HISFC.BizLogic.Manager.PrivInOutDept privInOutManager = new Neusoft.HISFC.BizLogic.Manager.PrivInOutDept(); return("科室 - " + this.deptHelper.GetName(typeItem)); case Neusoft.HISFC.Models.Base.EnumMSCustomType.调价: if (typeItem == "00") { return(this.strAdjustCollection[0]); } else { return(this.strAdjustCollection[1]); } case Neusoft.HISFC.Models.Base.EnumMSCustomType.盘点: //根据盘点盈亏 if (typeItem == "00") { return(this.strCheckCollection[0]); } else { return(this.strCheckCollection[1]); } default: return(customType.ToString()); } }