Ejemplo n.º 1
0
        /// <summary>
        /// 修改是否显示的状态,隐藏后不再显示,但仍然记分
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void sbShowClick(object sender, EventArgs e)
        {
            StateButton ub    = (StateButton)sender;
            int         index = ((GridViewRow)(ub.Parent.Parent)).RowIndex;
            int         id    = int.Parse(this.GridView1.DataKeys[index].Value.ToString());

            //
            Song.Entities.TeacherComment entity = Business.Do <ITeacher>().CommentSingle(id);
            entity.Thc_IsShow = !entity.Thc_IsShow;
            Business.Do <ITeacher>().CommentSave(entity);
            BindData(null, null);
        }
Ejemplo n.º 2
0
 private void fill()
 {
     Song.Entities.TeacherComment th = Business.Do <ITeacher>().CommentSingle(id);
     if (th == null)
     {
         return;
     }
     if (id != 0)
     {
         this.EntityBind(th);
     }
     //评价人,即学员
     Song.Entities.Accounts acc = Business.Do <IAccounts>().AccountsSingle(th.Ac_ID);
     if (acc != null)
     {
         this.EntityBind(this.plAccount, acc);
     }
 }
Ejemplo n.º 3
0
        protected void btnEnter_Click(object sender, EventArgs e)
        {
            try
            {
                if (id < 1)
                {
                    throw new Exception("参数不正确!");
                }
                Song.Entities.TeacherComment thc = Business.Do <ITeacher>().CommentSingle(id);
                thc.Thc_Reply  = Thc_Reply.Text.Trim();
                thc.Thc_IsUse  = Thc_IsUse.Checked;
                thc.Thc_IsShow = Thc_IsShow.Checked;

                Business.Do <ITeacher>().CommentSave(thc);
                Master.AlertCloseAndRefresh("操作成功!");
            }
            catch (Exception ex)
            {
                Master.Alert(ex.Message);
            }
        }