Exemple #1
0
        public void Bind()
        {
            UserCollect_Bll uc_b           = new UserCollect_Bll();
            DateTime        now            = DateTime.Now.Date;
            DateTime        myregistertime = DateTime.Parse(uc_b.GetUserCollectByUIDandCID(u_id, c_id).UC_EndDay.ToString()).Date;
            TimeSpan        ts             = myregistertime.Subtract(now);//计算开始时间到结束时间天数差
            int             t1             = ts.Days;

            // int t2 =Convert.ToInt32( BCZ.BLL.UserCollectBusiness.GetUserCollectByUIDandCID(u_id,c_id).uc_Days.ToString());
            lab_view_days.Text = t1.ToString();
        }
Exemple #2
0
        public void Bind()
        {
            UserCollect_Bll uc_b = new UserCollect_Bll();
            Coures_Bll      cb   = new Coures_Bll();
            DateTime        now  = DateTime.Now.Date;

            DateTime myregistertime = DateTime.Parse(myRegisterTime.Text.Trim()).Date;
            TimeSpan ts             = myregistertime.Subtract(now);//计算开始时间到结束时间天数差

            days     = ts.Days;
            daycount = Convert.ToInt32(uc_b.GetUserCollectByUIDandCID(u_id, c_id).UC_EveWord.ToString());
            if (days > 0)
            {
                daycount = Convert.ToInt32(cb.GetCourse(c_id).C_vocabulary.ToString()) / days;
            }
            lab_words.Text = daycount.ToString();//总单词数除以天数得到每天单词数
        }