Пример #1
0
        /*  summary:    支付当前学期学费
         *  param:      termNo(学期号) ,studNo(专业号),学号(studNo)
         *  return:     void
         *  author:     myThis
         * */
        public void PayStudTuition(string termNo, string specNo, string studNo)
        {
            // 获得总金额
            int all = GetPayAllByTermNoAndSpecNo(termNo, specNo, studNo);
            // 改写学生的学费表
            StudTuition reStuT = (from studtui in db.StudTuition
                                  where studtui.studNo == studNo && studtui.termNo == termNo
                                  select studtui).First();
            // 获得学费缴纳表
            Tuition reTuition = (from tuition in db.Tuition
                                 where tuition.termNo == termNo && tuition.specNo == specNo
                                 select tuition).First();
            // 获得当前的日期 如2018-11-11
            string NowData = DateTime.Now.ToString("yyyy-MM-dd");;

            // 填写学费
            if (reStuT != null && reTuition != null)
            {
                reStuT.sAccom      = reTuition.accom;    // 住宿费
                reStuT.sBook       = reTuition.book;     // 书本费
                reStuT.sData       = NowData;            // 当前日期
                reStuT.sOther      = reTuition.other;    // 其他费(学杂费)
                reStuT.sPremiun    = reTuition.premiun;  // 保险费
                reStuT.sRealCharge = all;                // 实际缴费费
                reStuT.sRealPay    = all;                // 实际支付费
                reStuT.sTuition    = reTuition.tuition1; // 学费
            }
            // 提交数据
            db.SubmitChanges();
        }
Пример #2
0
 public GraduateStudent(Person person, string spec, string dolj, Tuition form, int year) : base(person.Name, person.Surname, person.Date)
 {
     this.spec    = spec;
     this.dolj    = dolj;
     this.form    = form;
     this.year    = year;
     this.Aspstat = new List <Article>();
 }
Пример #3
0
        public static string Resolve(Tuition tuition, StudyGroup studyGroup)
        {
            if (studyGroup?.Id != null)
            {
                return(Resolve(studyGroup));
            }

            return($"{tuition.SubjectRef.Abbreviation}-{tuition.StudyGroupRef.Name}");
        }
Пример #4
0
        public static string Resolve(Tuition tuition)
        {
            if (tuition.StudyGroupRef.Id == null) // Klassenunterricht
            {
                return($"{tuition.SubjectRef.Abbreviation}-{tuition.StudyGroupRef.Name}");
            }

            return(tuition.StudyGroupRef.Name);
        }
Пример #5
0
 public GraduateStudent()
 {
     ryk          = new Person();
     this.spec    = "Blank";
     this.dolj    = "Blank";
     this.form    = Tuition.FullTime;
     this.year    = 2018;
     this.Aspstat = new List <Article>();
     this.ryknot  = new List <Notes>();
 }
Пример #6
0
        public void Test_Increase(decimal tuition, byte inc, decimal expected)
        {
            //Arrange

            //Act
            decimal actual = Tuition.Increase(tuition, inc);

            //Assert
            Assert.Equal(expected.ToString("C"), actual.ToString("C"));
        }
Пример #7
0
        /*  summary:    创建的学费标准
         *  param:      term  specNo tuition  premiun accom  book other
         *  return:     List<Term> 学年
         *  author:     myThis
         * */
        public void GreateTuition(string term, string specNo, int tuition, int premiun, int accom, int book, int other)
        {
            Tuition tui = new Tuition();

            tui.specNo   = specNo;
            tui.termNo   = term;
            tui.tuition1 = tuition;
            tui.premiun  = premiun;
            tui.accom    = accom;
            tui.book     = book;
            tui.other    = other;
            tui.total    = tuition + premiun + accom + book + other;
            db.Tuition.InsertOnSubmit(tui);
            db.SubmitChanges();
        }
Пример #8
0
        /*  summary:    修改学费表的信息
         *  param:      string termNo(学期) string specName(专业名) int tuition(学费)
         *              int premiun(保险费) int accom(住宿费) int book(书本费)
         *              int other(其他费用) int total(总费)
         *  return:     void
         *  author:     myThis
         * */
        public void SetTuition(string termNo, string specName, int tuition, int premiun
                               , int accom, int book, int other)
        {
            // 获得专业号
            string specNo = GetSpecNoBySpecName(specName);
            // 获得要修改的对象
            Tuition tui = (from t in db.Tuition
                           where t.termNo == termNo && t.specNo == specNo
                           select t).First();

            tui.tuition1 = tuition;
            tui.premiun  = premiun;
            tui.accom    = accom;
            tui.book     = book;
            tui.other    = other;
            tui.total    = tuition + premiun + accom + book + other;
            // 对数据库进行修改
            db.SubmitChanges();
        }
Пример #9
0
        public List <GraduateStudent> Aspirants(Tuition form)
        {
            var asp = _studentDictionary.Values.Where(a => a.Form == form).ToList();

            return(asp);
        }
Пример #10
0
 public void printMe()
 {
     Console.WriteLine("\nStudent's Details\n-------------------\nName: {0}\nAge: {1}\nHeight: {2}m\nTuition: {3}\nStarted Date: {4}\nPhone: {5}\n", Fullname, Age, Height.ToString("N2"), Tuition.ToString("N2"), StartDate.ToString("dddd, dd MMMM yyyy"), Phone);
 }