/// <summary> /// 收支类别名称获得 /// </summary> /// <param name="value"></param> /// <param name="targetType"></param> /// <param name="parameter"></param> /// <param name="culture"></param> /// <returns></returns> public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { int catId = 0; int.TryParse(value.ToString(), out catId); if (catId <= 0) { return("未知类别"); } return(IaeCategoryTsit.GetName(catId)); }
/// <summary> /// 设定详细信息内容项 /// </summary> private void SetDetailed() { txtId.Text = string.Format("{0}", IaeDetailedEntity.DetId); txtMember.Text = string.Format("{0}", MemberTsit.GetName(IaeDetailedEntity.MbrId)); txtAccount.Text = string.Format("{0}", AccountTsit.GetName(IaeDetailedEntity.AccId)); txtCategory.Text = string.Format("{0}", IaeCategoryTsit.GetName(IaeDetailedEntity.CatId)); txtTime.Text = string.Format("{0}", IaeDetailedEntity.DetAddTime.ToString("yyyy-MM-dd HH:mm:ss")); txtName.Text = string.Format("{0}", IaeDetailedEntity.DetName); txtMoney.Text = string.Format("{0}", IaeDetailedEntity.DetMoney); txtAddress.Text = string.Format("{0}", IaeDetailedEntity.DetAddress); txtDescription.Text = string.Format("{0}", IaeDetailedEntity.DetDescription); txtMemo.Text = string.Format("{0}", IaeDetailedEntity.DetMemo); }