public string GetItemName(ClassPaymentModel classPayment)
 {
     return(StatisticTypeManagement.Instance.StatisticTypeCollection.Where(s => s.StatisticType == StatisticTypeEnum.ClassFee).First().ShownText
            + "-" + _trainees.SearchTraineeName(classPayment.TraineeID)
            + "-" + (classPayment.ClassType == 0 ? _regularClasses.RegularClassCollection.Where(c => c.ClassID == classPayment.ClassID).First().ClassName
         : _blockClasses.BlockClassCollection.Where(c => c.ClassID == classPayment.ClassID).First().ClassName));
 }
Esempio n. 2
0
        public bool AddCountPayment(ClassPaymentModel model)
        {
            int rowsAffected;

            SqlParameter[] parameters =
            {
                new SqlParameter("@PaymentDate",  SqlDbType.Date),
                new SqlParameter("@TraineeID",    SqlDbType.VarChar, 50),
                new SqlParameter("@TotalCost",    SqlDbType.Decimal,  9),
                new SqlParameter("@ClassType",    SqlDbType.Int),
                new SqlParameter("@ClassID",      SqlDbType.VarChar, 50),
                new SqlParameter("@TotalCount",   SqlDbType.Int),
                new SqlParameter("@PaymentTerms", SqlDbType.Int)
            };
            parameters[0].Value = model.PaymentDate;
            parameters[1].Value = model.TraineeID;
            parameters[2].Value = model.TotalCost;
            parameters[3].Value = model.ClassType;
            parameters[4].Value = model.ClassID;
            parameters[5].Value = model.TotalCount;
            parameters[6].Value = model.PaymentTerms;

            DbHelperSQL.RunProcedure("ClassPaymentInfo_ADD_CountPayment_LK", parameters, out rowsAffected);
            return(true);
        }
 public FinanceRecordViewModel(ClassPaymentModel classPayment, Color recordColor, FinanceStatisticBussiness bussiness)
 {
     _statisticType = StatisticTypeEnum.ClassFee;
     AccountID      = classPayment.PaymentID;
     _classPayment  = classPayment;
     _recordColor   = recordColor;
     RecordItem     = bussiness.GetItemName(classPayment);
     RecordDate     = _classPayment.PaymentDate.ToString("yyyy年MM月dd日");
     RecordAmount   = classPayment.TotalCost.ToString();
     ChangeSelectState(false);
 }
Esempio n. 4
0
 public void AddPayment(ClassPaymentModel model)
 {
     _dal.AddCountPayment(model);
     OverdueChangedEvent?.Invoke();
     GeneralCapitalChanged?.Invoke(null, EventArgs.Empty);
 }