示例#1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         string cmd = Request.QueryString["cmd"].ToString();
         if (cmd == "add")   //若为添加则自动生成编号
         {
             TabContainer1.Tabs[0].HeaderText = "社科鉴定成果添加";
             txtAID.Text = "SK" + CreateNumber.GetNumber();
         }
         if (cmd == "modify")    //若为修改则绑定数据到文本框
         {
             TabContainer1.Tabs[0].HeaderText = "社科鉴定成果修改";
             string srid = Request.QueryString["srid"].ToString();
             if (srid != "")
             {
                 AchievementModel = AchievementBll.GetModel(srid);
                 if (AchievementModel != null)
                 {
                     //绑定数据到文本框
                 }
             }
         }
         BindDdlSource();
         BindDdlGrade();
     }
 }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string cmd = Request.QueryString["cmd"].ToString();
                if (cmd == "add")   //若为添加则自动生成编号
                {
                    TabContainer1.Tabs[0].HeaderText = "科技应用成果添加";
                    txtAID.Text = "YY" + CreateNumber.GetNumber();
                }
                if (cmd == "modify")    //若为修改则绑定数据到文本框
                {
                    TabContainer1.Tabs[0].HeaderText = "科技应用成果修改";
                    string srid = Request.QueryString["srid"].ToString();
                    if (srid != "")
                    {
                        AchievementModel = AchievementBll.GetModel(srid);
                        if (AchievementModel != null)
                        {
                            ddlSchoolSign.SelectedValue = AchievementModel.SchoolSign;
                            ddlRank.SelectedValue       = AchievementModel.Rank.ToString();
                            txtPopulation.Text          = AchievementModel.Population.ToString();
                            txtAllAuthor.Text           = AchievementModel.AllAuthor;
                            txtRemark.Text = AchievementModel.Remark;

                            txtAID.Text             = AchievementModel.PK_AID;
                            txtTitle.Text           = AchievementModel.Title;
                            txtTime.Text            = string.Format("{0:yyyy-MM-dd}", AchievementModel.PublishTime);
                            ddlSource.SelectedValue = AchievementModel.Source;
                        }
                    }
                }
                BindDdlSource();
            }
        }
示例#3
0
        private void BindData(string srid)
        {
            //得到对象实体
            AchievementModel = AchievementBll.GetModel(srid);
            UserModel        = UserBll.GetModel(AchievementModel.FK_UserID);

            //绑定数据到Label
            lblUserName.Text = UserModel.UserName;
            lblUserUnit.Text = UserModel.Unit;
            lblSex.Text      = UserModel.Sex;
            lblZhiCheng.Text = UserModel.ZhiCheng;

            lblBigSort.Text    = AchievementModel.BigSort;
            lblSchoolSign.Text = AchievementModel.SchoolSign;
            lblRank.Text       = (AchievementModel.Rank).ToString();
            lblPopulation.Text = (AchievementModel.Population).ToString();
            lblAllAuthor.Text  = AchievementModel.AllAuthor;
            lblRemark.Text     = AchievementModel.Remark;
            lblJiBie.Text      = (AchievementModel.LevelFactor).ToString() + AchievementModel.JiBie;
            lblPerScore.Text   = (AchievementModel.PerScore).ToString();
            string state = (AchievementModel.AuditState).ToString();

            lblAuditState.Text = StateInfo.GetAuditState(state);
            lblReason.Text     = AchievementModel.Extra1;

            if (state == "2" || state == "4" || state == "6")
            {
                PanelReasonVisible.Visible = true;
            }

            lblSRID.Text   = AchievementModel.PK_AID;
            lblTitle.Text  = AchievementModel.Title;
            lblTime.Text   = string.Format("{0:yyyy-MM-dd}", AchievementModel.PublishTime);
            lblType.Text   = AchievementModel.Type;
            lblUnit.Text   = AchievementModel.Unit;
            lblNumber.Text = AchievementModel.Number;

            //if (state == "1" || state == "3" || state == "5" || state == "7")
            //{
            //    Button1.Enabled = false;
            //    Button2.Enabled = false;
            //}
            //if (state == "3" || state == "5" || state == "7")
            //{
            //    Button3.Enabled = false;
            //    Button4.Enabled = false;
            //}
            //if (state == "5" || state == "7")
            //{
            //    Button5.Enabled = false;
            //    Button6.Enabled = false;
            //}
            //if (state == "7")
            //{
            //    Button7.Enabled = false;
            //    Button8.Enabled = false;
            //}
        }
        private void BindData(string srid)
        {
            //得到对象实体
            AchievementModel = AchievementBll.GetModel(srid);
            UserModel = UserBll.GetModel(AchievementModel.FK_UserID);

            //绑定数据到Label
            lblUserName.Text = UserModel.UserName;
            lblUserUnit.Text = UserModel.Unit;
            lblSex.Text = UserModel.Sex;
            lblZhiCheng.Text = UserModel.ZhiCheng;

            lblBigSort.Text = AchievementModel.BigSort;
            lblSchoolSign.Text = AchievementModel.SchoolSign;
            lblRank.Text = (AchievementModel.Rank).ToString();
            lblPopulation.Text = (AchievementModel.Population).ToString();
            lblAllAuthor.Text = AchievementModel.AllAuthor;
            lblRemark.Text = AchievementModel.Remark;
            lblJiBie.Text = (AchievementModel.LevelFactor).ToString() + AchievementModel.JiBie;
            lblPerScore.Text = (AchievementModel.PerScore).ToString();
            string state = (AchievementModel.AuditState).ToString();
            lblAuditState.Text = StateInfo.GetAuditState(state);
            lblReason.Text = AchievementModel.Extra1;

            if (state == "2" || state == "4" || state == "6")
            {
                PanelReasonVisible.Visible = true;
            }

            lblSRID.Text = AchievementModel.PK_AID;
            lblTitle.Text = AchievementModel.Title;
            lblTime.Text = string.Format("{0:yyyy-MM-dd}", AchievementModel.PublishTime);
            lblType.Text = AchievementModel.Type;
            lblUnit.Text = AchievementModel.Unit;
            lblNumber.Text = AchievementModel.Number;

            //if (state == "1" || state == "3" || state == "5" || state == "7")
            //{
            //    Button1.Enabled = false;
            //    Button2.Enabled = false;
            //}
            //if (state == "3" || state == "5" || state == "7")
            //{
            //    Button3.Enabled = false;
            //    Button4.Enabled = false;
            //}
            //if (state == "5" || state == "7")
            //{
            //    Button5.Enabled = false;
            //    Button6.Enabled = false;
            //}
            //if (state == "7")
            //{
            //    Button7.Enabled = false;
            //    Button8.Enabled = false;
            //}
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["Role"] != null)
                {
                    string srid = Request.QueryString["srid"].ToString();  //获得成果编号

                    if (srid != "")
                    {
                        BindData(srid);

                        AchievementModel = AchievementBll.GetModel(srid);
                        string state = (AchievementModel.AuditState).ToString();

                        string cmd = Request.QueryString["cmd"].ToString();
                        if ((cmd == "preview") && (state == "0" || state == "2" || state == "4" || state == "6"))
                        {
                            Panel1.Visible = true;  //显示提交、修改按钮(公用)
                        }

                        string role = Session["Role"].ToString();   //角色
                        switch (role)   //根据角色不同显示不同的操作按钮
                        {
                            //case "教师":
                            //    if (state == "0" || state == "2" || state == "4" || state == "6")
                            //    {
                            //        Panel1.Visible = true;
                            //    }
                            //    break;
                            case "管理员":
                                if (state == "1")
                                {
                                    Panel2.Visible = true;
                                }
                                break;
                            case "系统管理员":
                                if (state == "3")
                                {
                                    Panel3.Visible = true;
                                    lbtnUpdateJiBie.Visible = true;
                                }
                                break;
                            case "超级管理员":
                                if (state == "3")
                                {
                                    Panel3.Visible = true;
                                    lbtnUpdateJiBie.Visible = true;
                                }
                                if (state == "5" || state == "6" || state == "7")
                                {
                                    CheckBox1.Visible = true;
                                }
                                break;
                            default:
                                break;
                        }
                    }
                }
                else
                {
                    Response.Write("<script language=javascript>alert('您已经与服务器断开连接,请重新登录!');window.location.href='~/../../login.aspx';</script>");
                    //Response.Redirect("~/login.aspx");
                }
            }
        }
示例#6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["Role"] != null)
                {
                    string srid = Request.QueryString["srid"].ToString();  //获得成果编号

                    if (srid != "")
                    {
                        BindData(srid);

                        AchievementModel = AchievementBll.GetModel(srid);
                        string state = (AchievementModel.AuditState).ToString();

                        string cmd = Request.QueryString["cmd"].ToString();
                        if ((cmd == "preview") && (state == "0" || state == "2" || state == "4" || state == "6"))
                        {
                            Panel1.Visible = true;  //显示提交、修改按钮(公用)
                        }

                        string role = Session["Role"].ToString(); //角色
                        switch (role)                             //根据角色不同显示不同的操作按钮
                        {
                        //case "教师":
                        //    if (state == "0" || state == "2" || state == "4" || state == "6")
                        //    {
                        //        Panel1.Visible = true;
                        //    }
                        //    break;
                        case "管理员":
                            if (state == "1")
                            {
                                Panel2.Visible = true;
                            }
                            break;

                        case "系统管理员":
                            if (state == "3")
                            {
                                Panel3.Visible          = true;
                                lbtnUpdateJiBie.Visible = true;
                            }
                            break;

                        case "超级管理员":
                            if (state == "3")
                            {
                                Panel3.Visible          = true;
                                lbtnUpdateJiBie.Visible = true;
                            }
                            if (state == "5" || state == "6" || state == "7")
                            {
                                CheckBox1.Visible = true;
                            }
                            break;

                        default:
                            break;
                        }
                    }
                }
                else
                {
                    Response.Write("<script language=javascript>alert('您已经与服务器断开连接,请重新登录!');window.location.href='~/../../login.aspx';</script>");
                    //Response.Redirect("~/login.aspx");
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindDdlType();  //绑定学科下拉列表
                string cmd = Request.QueryString["cmd"].ToString();
                if (cmd == "add")   //若为添加则自动生成编号
                {
                    TabContainer1.Tabs[0].HeaderText = "创作类成果添加";
                    txtAID.Text = "CZ" + CreateNumber.GetNumber();
                }
                if (cmd == "modify")    //若为修改则绑定数据到文本框
                {
                    TabContainer1.Tabs[0].HeaderText = "创作类成果修改";
                    string srid = Request.QueryString["srid"].ToString();
                    if (srid != "")
                    {
                        AchievementModel = AchievementBll.GetModel(srid);
                        if (AchievementModel != null)
                        {
                            ddlSchoolSign.SelectedValue = AchievementModel.SchoolSign;
                            ddlRank.SelectedValue = AchievementModel.Rank.ToString();
                            txtPopulation.Text = AchievementModel.Population.ToString();
                            txtAllAuthor.Text = AchievementModel.AllAuthor;
                            txtRemark.Text = AchievementModel.Remark;

                            txtAID.Text = AchievementModel.PK_AID;
                            txtTime.Text = string.Format("{0:yyyy-MM-dd}", AchievementModel.PublishTime);
                            txtTitle.Text = AchievementModel.Title;
                            ddlType.SelectedValue = AchievementModel.Type;
                            ddlUnit.SelectedValue = AchievementModel.Unit;
                        }
                    }
                }
            }
        }
示例#8
0
 /// <summary>
 /// ��������б�
 /// </summary>
 public List<ZQUSR.Model.sr_Achievement> DataTableToList(DataTable dt)
 {
     List<ZQUSR.Model.sr_Achievement> modelList = new List<ZQUSR.Model.sr_Achievement>();
     int rowsCount = dt.Rows.Count;
     if (rowsCount > 0)
     {
         ZQUSR.Model.sr_Achievement model;
         for (int n = 0; n < rowsCount; n++)
         {
             model = new ZQUSR.Model.sr_Achievement();
             model.PK_AID=dt.Rows[n]["PK_AID"].ToString();
             model.FK_UserID=dt.Rows[n]["FK_UserID"].ToString();
             model.BigSort=dt.Rows[n]["BigSort"].ToString();
             model.SmallSort=dt.Rows[n]["SmallSort"].ToString();
             model.Type=dt.Rows[n]["Type"].ToString();
             model.Title=dt.Rows[n]["Title"].ToString();
             if(dt.Rows[n]["AddTime"].ToString()!="")
             {
                 model.AddTime=DateTime.Parse(dt.Rows[n]["AddTime"].ToString());
             }
             model.Unit=dt.Rows[n]["Unit"].ToString();
             model.Source=dt.Rows[n]["Source"].ToString();
             if(dt.Rows[n]["PublishTime"].ToString()!="")
             {
                 model.PublishTime=DateTime.Parse(dt.Rows[n]["PublishTime"].ToString());
             }
             model.Number=dt.Rows[n]["Number"].ToString();
             if(dt.Rows[n]["Rank"].ToString()!="")
             {
                 model.Rank=int.Parse(dt.Rows[n]["Rank"].ToString());
             }
             if(dt.Rows[n]["Population"].ToString()!="")
             {
                 model.Population=int.Parse(dt.Rows[n]["Population"].ToString());
             }
             model.AllAuthor=dt.Rows[n]["AllAuthor"].ToString();
             model.SchoolSign=dt.Rows[n]["SchoolSign"].ToString();
             model.Grade=dt.Rows[n]["Grade"].ToString();
             model.Remark=dt.Rows[n]["Remark"].ToString();
             model.AuditState=dt.Rows[n]["AuditState"].ToString();
             model.JiBie=dt.Rows[n]["JiBie"].ToString();
             if(dt.Rows[n]["LevelFactor"].ToString()!="")
             {
                 model.LevelFactor=decimal.Parse(dt.Rows[n]["LevelFactor"].ToString());
             }
             if(dt.Rows[n]["PerScore"].ToString()!="")
             {
                 model.PerScore=decimal.Parse(dt.Rows[n]["PerScore"].ToString());
             }
             if(dt.Rows[n]["Rewards"].ToString()!="")
             {
                 model.Rewards=decimal.Parse(dt.Rows[n]["Rewards"].ToString());
             }
             if(dt.Rows[n]["Bounty"].ToString()!="")
             {
                 model.Bounty=decimal.Parse(dt.Rows[n]["Bounty"].ToString());
             }
             if(dt.Rows[n]["ShiFa"].ToString()!="")
             {
                 model.ShiFa=decimal.Parse(dt.Rows[n]["ShiFa"].ToString());
             }
             model.Extra1=dt.Rows[n]["Extra1"].ToString();
             model.Extra2=dt.Rows[n]["Extra2"].ToString();
             model.Extra3=dt.Rows[n]["Extra3"].ToString();
             model.Extra4=dt.Rows[n]["Extra4"].ToString();
             model.Extra5=dt.Rows[n]["Extra5"].ToString();
             modelList.Add(model);
         }
     }
     return modelList;
 }
示例#9
0
 /// <summary>
 /// 更新级别分系数、级别、个人得分
 /// </summary>
 /// <param name="model"></param>
 public void UpdateJiBie(ZQUSR.Model.sr_Achievement model)
 {
     dal.UpdateJiBie(model);
 }
示例#10
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(ZQUSR.Model.sr_Achievement model)
 {
     dal.Add(model);
 }
示例#11
0
 /// <summary>
 /// 返回成果类数据列表(教师角色)     ——By Jianguo Fung
 /// </summary>
 /// <returns></returns>
 public DataSet GetAchievementByJs(ZQUSR.Model.sr_Achievement model)
 {
     return(dal.GetAchievementByJs(model));
 }
示例#12
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
        //{
        //return dal.GetList(PageSize,PageIndex,strWhere);
        //}

        #endregion  成员方法

        #region  成果类新增
        /// <summary>
        /// 成果类新增      ——By Jianguo Fung
        /// </summary>
        /// <param name="AchievementModel"></param>
        public void AddAchievement(ZQUSR.Model.sr_Achievement AchievementModel)
        {
            dal.AddAchievement(AchievementModel);
        }
示例#13
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <ZQUSR.Model.sr_Achievement> DataTableToList(DataTable dt)
        {
            List <ZQUSR.Model.sr_Achievement> modelList = new List <ZQUSR.Model.sr_Achievement>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                ZQUSR.Model.sr_Achievement model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model           = new ZQUSR.Model.sr_Achievement();
                    model.PK_AID    = dt.Rows[n]["PK_AID"].ToString();
                    model.FK_UserID = dt.Rows[n]["FK_UserID"].ToString();
                    model.BigSort   = dt.Rows[n]["BigSort"].ToString();
                    model.SmallSort = dt.Rows[n]["SmallSort"].ToString();
                    model.Type      = dt.Rows[n]["Type"].ToString();
                    model.Title     = dt.Rows[n]["Title"].ToString();
                    if (dt.Rows[n]["AddTime"].ToString() != "")
                    {
                        model.AddTime = DateTime.Parse(dt.Rows[n]["AddTime"].ToString());
                    }
                    model.Unit   = dt.Rows[n]["Unit"].ToString();
                    model.Source = dt.Rows[n]["Source"].ToString();
                    if (dt.Rows[n]["PublishTime"].ToString() != "")
                    {
                        model.PublishTime = DateTime.Parse(dt.Rows[n]["PublishTime"].ToString());
                    }
                    model.Number = dt.Rows[n]["Number"].ToString();
                    if (dt.Rows[n]["Rank"].ToString() != "")
                    {
                        model.Rank = int.Parse(dt.Rows[n]["Rank"].ToString());
                    }
                    if (dt.Rows[n]["Population"].ToString() != "")
                    {
                        model.Population = int.Parse(dt.Rows[n]["Population"].ToString());
                    }
                    model.AllAuthor  = dt.Rows[n]["AllAuthor"].ToString();
                    model.SchoolSign = dt.Rows[n]["SchoolSign"].ToString();
                    model.Grade      = dt.Rows[n]["Grade"].ToString();
                    model.Remark     = dt.Rows[n]["Remark"].ToString();
                    model.AuditState = dt.Rows[n]["AuditState"].ToString();
                    model.JiBie      = dt.Rows[n]["JiBie"].ToString();
                    if (dt.Rows[n]["LevelFactor"].ToString() != "")
                    {
                        model.LevelFactor = decimal.Parse(dt.Rows[n]["LevelFactor"].ToString());
                    }
                    if (dt.Rows[n]["PerScore"].ToString() != "")
                    {
                        model.PerScore = decimal.Parse(dt.Rows[n]["PerScore"].ToString());
                    }
                    if (dt.Rows[n]["Rewards"].ToString() != "")
                    {
                        model.Rewards = decimal.Parse(dt.Rows[n]["Rewards"].ToString());
                    }
                    if (dt.Rows[n]["Bounty"].ToString() != "")
                    {
                        model.Bounty = decimal.Parse(dt.Rows[n]["Bounty"].ToString());
                    }
                    if (dt.Rows[n]["ShiFa"].ToString() != "")
                    {
                        model.ShiFa = decimal.Parse(dt.Rows[n]["ShiFa"].ToString());
                    }
                    model.Extra1 = dt.Rows[n]["Extra1"].ToString();
                    model.Extra2 = dt.Rows[n]["Extra2"].ToString();
                    model.Extra3 = dt.Rows[n]["Extra3"].ToString();
                    model.Extra4 = dt.Rows[n]["Extra4"].ToString();
                    model.Extra5 = dt.Rows[n]["Extra5"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         string cmd = Request.QueryString["cmd"].ToString();
         if (cmd == "add")   //若为添加则自动生成编号
         {
             TabContainer1.Tabs[0].HeaderText = "软科学成果添加";
             txtAID.Text = "RK" + CreateNumber.GetNumber();
         }
         if (cmd == "modify")    //若为修改则绑定数据到文本框
         {
             TabContainer1.Tabs[0].HeaderText = "软科学成果修改";
             string srid = Request.QueryString["srid"].ToString();
             if (srid != "")
             {
                 AchievementModel = AchievementBll.GetModel(srid);
                 if (AchievementModel != null)
                 {
                     //绑定数据到文本框
                 }
             }
         }
         BindDdlUnit();
     }
 }
示例#15
0
 /// <summary>
 /// 获奖成果:根据获奖级别(Source)和获奖等级(Grade)返回对应的级别(JiBie)及级别分系数(LevelFactor)     ——By Jianguo Fung
 /// </summary>
 /// <param name="AchievementModel"></param>
 /// <returns></returns>
 public ZQUSR.Model.sr_Evaluate GetHuoJiangJiBie(ZQUSR.Model.sr_Achievement AchievementModel)
 {
     return(dal.GetHuoJiangJiBie(AchievementModel));
 }
示例#16
0
 /// <summary>
 /// 软科学成果:根据采纳部门(Unit)返回对应的级别(JiBie)和级别分系数(LevelFactor) ——By Jianguo Fung
 /// </summary>
 /// <param name="AchievementModel"></param>
 /// <returns></returns>
 public ZQUSR.Model.sr_Evaluate GetRuanKeXueJiBie(ZQUSR.Model.sr_Achievement AchievementModel)
 {
     return(dal.GetRuanKeXueJiBie(AchievementModel));
 }