Esempio n. 1
0
        private bool DoAdd()
        {
            BLL.common_examination   bll   = new BLL.common_examination();
            Model.common_examination model = new Model.common_examination();

            model.group_id  = (int)EnumCollection.examination_group.精品微课测验;
            model.name      = Convert.ToString(txtname.Text);
            model.parent_id = this.chapter;
            model.nums      = Convert.ToInt32(txtnums.Text);
            model.score     = Convert.ToInt32(txtscore.Text);
            model.qrcode    = "";
            model.add_time  = System.DateTime.Now;

            int row = bll.Add(model);

            if (row > 0)
            {
                addrow       = row;
                model.id     = row;
                model.qrcode = "/QrCode.aspx?type=test&id=" + row;
                bll.Update(model);

                AddAdminLog(EnumCollection.ActionEnum.Add.ToString(), "添加试卷信息,主键:" + row); //记录日志
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 2
0
        //保存
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            ChkAdminLevel("_ybd_common_examination", EnumCollection.ActionEnum.Modify.ToString()); //检查权限
            BLL.common_examination   bll   = new BLL.common_examination();
            Model.common_examination model = bll.GetModel(this.id);

            model.group_id  = Convert.ToInt32(txtgroup_id.Text);
            model.name      = Convert.ToString(txtname.Text);
            model.parent_id = Convert.ToInt32(txtparent_id.Text);
            model.nums      = Convert.ToInt32(txtnums.Text);
            model.score     = Convert.ToInt32(txtscore.Text);
            model.info      = Convert.ToString(txtinfo.Text);
            model.descript  = Convert.ToString(txtdescript.Text);
            model.qrcode    = Convert.ToString(txtqrcode.Text);
            model.add_time  = Convert.ToDateTime(txtadd_time.Text);

            if (bll.Update(model))
            {
                AddAdminLog(EnumCollection.ActionEnum.Modify.ToString(), "修改试卷信息信息,主键:" + id); //记录日志
                JscriptMsg("修改试卷信息信息成功!", "Manage.aspx");
            }
            else
            {
                JscriptMsg("保存过程中发生错误!", "");
            }
        }
Esempio n. 3
0
        private bool DoEdit(int id)
        {
            BLL.common_examination   bll   = new BLL.common_examination();
            Model.common_examination model = bll.GetModel(this.id);

            model.group_id  = (int)EnumCollection.examination_group.心理测试;
            model.name      = Convert.ToString(txtname.Text);
            model.parent_id = this.chapter;
            model.nums      = 0;
            model.score     = 0;
            model.info      = this.txtinfo.Text.Trim();
            model.descript  = this.txtdescript.Text.Trim();
            model.qrcode    = "/QrCode.aspx?type=quest&id=" + id;
            model.add_time  = System.DateTime.Now;

            if (bll.Update(model))
            {
                AddAdminLog(EnumCollection.ActionEnum.Modify.ToString(), "修改问卷信息,主键:" + id); //记录日志
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 4
0
        private bool DoEdit(int id)
        {
            BLL.common_examination   bll   = new BLL.common_examination();
            Model.common_examination model = bll.GetModel(this.id);

            model.group_id  = (int)EnumCollection.examination_group.课堂作业;
            model.name      = Convert.ToString(txtname.Text);
            model.parent_id = this.chapter;
            model.nums      = Convert.ToInt32(txtnums.Text);
            model.score     = Convert.ToInt32(txtscore.Text);
            model.qrcode    = "/QrCode.aspx?type=test&id=" + id;
            model.add_time  = System.DateTime.Now;

            if (bll.Update(model))
            {
                addRow = model.id;
                AddAdminLog(EnumCollection.ActionEnum.Modify.ToString(), "修改课堂作业信息,主键:" + id); //记录日志
                return(true);
            }
            else
            {
                return(false);
            }
        }