示例#1
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        //获取题目排列顺序
        string ShunXuStr = "";

        for (int i = 0; i < ListBox2.Items.Count; i++)
        {
            if (ShunXuStr == "")
            {
                ShunXuStr = ListBox2.Items[i].Text;
            }
            else
            {
                ShunXuStr = ShunXuStr + "|" + ListBox2.Items[i].Text;
            }
        }



        ZWL.BLL.ERPTiKuShiJuan Model = new ZWL.BLL.ERPTiKuShiJuan();

        Model.ShiJuanTitle   = this.txtShiJuanTitle.Text.ToString();
        Model.IFSuiJiChuTi   = this.RadioButtonList1.SelectedItem.Text.ToString();
        Model.FenLeiShunXu   = ShunXuStr;
        Model.KaoShiXianShi  = int.Parse(this.txtKaoShiXianShi.Text);
        Model.PanDuanTiList  = "";
        Model.DanXuanTiList  = "";
        Model.DuoXuanTiList  = "";
        Model.TianKongTiList = "";
        Model.JianDaTiList   = "";
        Model.PanDuanFenShu  = decimal.Parse(this.txtPanDuanFenShu.Text);
        Model.DanXuanFenShu  = decimal.Parse(this.txtDanXuanFenShu.Text);
        Model.DuoXuanFenShu  = decimal.Parse(this.txtDuoXuanFenShu.Text);
        Model.TianKongFenShu = decimal.Parse(this.txtTianKongFenShu.Text);
        Model.JianDaFenShu   = decimal.Parse(this.txtJianDaFenShu.Text);
        Model.BackInfo       = this.txtBackInfo.Text.ToString();
        Model.UserName       = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        Model.TimeStr        = DateTime.Now;

        Model.Add();

        //写系统日志
        ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
        MyRiZhi.UserName    = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        MyRiZhi.DoSomething = "用户添加试卷管理信息(" + this.txtShiJuanTitle.Text + ")";
        MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        MyRiZhi.Add();

        ZWL.Common.MessageBox.ShowAndRedirect(this, "试卷管理信息添加成功!", "TiKuShiJuan.aspx");
    }
示例#2
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        //��ȡ��Ŀ����˳��
        string ShunXuStr = "";
        for (int i = 0; i < ListBox2.Items.Count; i++)
        {
            if (ShunXuStr == "")
            {
                ShunXuStr = ListBox2.Items[i].Text;
            }
            else
            {
                ShunXuStr = ShunXuStr + "|" + ListBox2.Items[i].Text;
            }
        }

        ZWL.BLL.ERPTiKuShiJuan Model = new ZWL.BLL.ERPTiKuShiJuan();

        Model.ShiJuanTitle=this.txtShiJuanTitle.Text.ToString();
        Model.IFSuiJiChuTi=this.RadioButtonList1.SelectedItem.Text.ToString();
        Model.FenLeiShunXu = ShunXuStr;
        Model.KaoShiXianShi=int.Parse(this.txtKaoShiXianShi.Text);
        Model.PanDuanTiList="";
        Model.DanXuanTiList="";
        Model.DuoXuanTiList="";
        Model.TianKongTiList="";
        Model.JianDaTiList="";
        Model.PanDuanFenShu=decimal.Parse(this.txtPanDuanFenShu.Text);
        Model.DanXuanFenShu=decimal.Parse(this.txtDanXuanFenShu.Text);
        Model.DuoXuanFenShu=decimal.Parse(this.txtDuoXuanFenShu.Text);
        Model.TianKongFenShu=decimal.Parse(this.txtTianKongFenShu.Text);
        Model.JianDaFenShu=decimal.Parse(this.txtJianDaFenShu.Text);
        Model.BackInfo=this.txtBackInfo.Text.ToString();
        Model.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        Model.TimeStr=DateTime.Now;

        Model.Add();

        //дϵͳ��־
        ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
        MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        MyRiZhi.DoSomething = "�û�����Ծ������Ϣ(" + this.txtShiJuanTitle.Text + ")";
        MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        MyRiZhi.Add();

        ZWL.Common.MessageBox.ShowAndRedirect(this, "�Ծ������Ϣ��ӳɹ���", "TiKuShiJuan.aspx");
    }