Пример #1
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(ZQUSR.Model.sr_Project model)
 {
     dal.Update(model);
 }
Пример #2
0
 /// <summary>
 /// ��������б�
 /// </summary>
 public List<ZQUSR.Model.sr_Project> DataTableToList(DataTable dt)
 {
     List<ZQUSR.Model.sr_Project> modelList = new List<ZQUSR.Model.sr_Project>();
     int rowsCount = dt.Rows.Count;
     if (rowsCount > 0)
     {
         ZQUSR.Model.sr_Project model;
         for (int n = 0; n < rowsCount; n++)
         {
             model = new ZQUSR.Model.sr_Project();
             model.PK_PID=dt.Rows[n]["PK_PID"].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.Source=dt.Rows[n]["Source"].ToString();
             if(dt.Rows[n]["PublishTime1"].ToString()!="")
             {
                 model.PublishTime1=DateTime.Parse(dt.Rows[n]["PublishTime1"].ToString());
             }
             if(dt.Rows[n]["PublishTime2"].ToString()!="")
             {
                 model.PublishTime2=DateTime.Parse(dt.Rows[n]["PublishTime2"].ToString());
             }
             if(dt.Rows[n]["Anchorperson"].ToString()!="")
             {
                 model.Anchorperson=int.Parse(dt.Rows[n]["Anchorperson"].ToString());
             }
             model.ReviewState=dt.Rows[n]["ReviewState"].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.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());
             }
             if(dt.Rows[n]["Funds1"].ToString()!="")
             {
                 model.Funds1=decimal.Parse(dt.Rows[n]["Funds1"].ToString());
             }
             if(dt.Rows[n]["Funds2"].ToString()!="")
             {
                 model.Funds2=decimal.Parse(dt.Rows[n]["Funds2"].ToString());
             }
             if(dt.Rows[n]["Funds3"].ToString()!="")
             {
                 model.Funds3=decimal.Parse(dt.Rows[n]["Funds3"].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;
 }
Пример #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(ZQUSR.Model.sr_Project model)
 {
     dal.Add(model);
 }
Пример #4
0
 /// <summary>
 /// 返回科研项目数据列表(教师角色)     ——By Jianguo Fung
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public DataSet GetProject(ZQUSR.Model.sr_Project model)
 {
     return(dal.GetProject(model));
 }
Пример #5
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <ZQUSR.Model.sr_Project> DataTableToList(DataTable dt)
        {
            List <ZQUSR.Model.sr_Project> modelList = new List <ZQUSR.Model.sr_Project>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                ZQUSR.Model.sr_Project model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model           = new ZQUSR.Model.sr_Project();
                    model.PK_PID    = dt.Rows[n]["PK_PID"].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.Source = dt.Rows[n]["Source"].ToString();
                    if (dt.Rows[n]["PublishTime1"].ToString() != "")
                    {
                        model.PublishTime1 = DateTime.Parse(dt.Rows[n]["PublishTime1"].ToString());
                    }
                    if (dt.Rows[n]["PublishTime2"].ToString() != "")
                    {
                        model.PublishTime2 = DateTime.Parse(dt.Rows[n]["PublishTime2"].ToString());
                    }
                    if (dt.Rows[n]["Anchorperson"].ToString() != "")
                    {
                        model.Anchorperson = int.Parse(dt.Rows[n]["Anchorperson"].ToString());
                    }
                    model.ReviewState = dt.Rows[n]["ReviewState"].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.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());
                    }
                    if (dt.Rows[n]["Funds1"].ToString() != "")
                    {
                        model.Funds1 = decimal.Parse(dt.Rows[n]["Funds1"].ToString());
                    }
                    if (dt.Rows[n]["Funds2"].ToString() != "")
                    {
                        model.Funds2 = decimal.Parse(dt.Rows[n]["Funds2"].ToString());
                    }
                    if (dt.Rows[n]["Funds3"].ToString() != "")
                    {
                        model.Funds3 = decimal.Parse(dt.Rows[n]["Funds3"].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);
        }
Пример #6
0
 /// <summary>
 /// 科研项目:根据申报项目类型(Type)、项目来源(Source)和申报情况(Grade)返回对应的级别(JiBie)及级别分系数(LevelFactor)     ——By Jianguo Fung
 /// </summary>
 /// <param name="ProjectModel"></param>
 /// <returns></returns>
 public ZQUSR.Model.sr_Evaluate GetShenBaoJiBie(ZQUSR.Model.sr_Project ProjectModel)
 {
     return(dal.GetShenBaoJiBie(ProjectModel));
 }
Пример #7
0
 /// <summary>
 /// 科研项目:根据项目类型(Type)和项目来源(Source)返回对应的级别(JiBie)及级别分系数(LevelFactor)     ——By Jianguo Fung
 /// </summary>
 /// </summary>
 /// <param name="ProjectModel"></param>
 /// <returns></returns>
 public ZQUSR.Model.sr_Evaluate GetXiangMuJiBie(ZQUSR.Model.sr_Project ProjectModel)
 {
     return(dal.GetXiangMuJiBie(ProjectModel));
 }