示例#1
0
 /// <summary>
 /// 创建团队成果信息
 /// </summary>
 /// <param name="workinfo">成果实体</param>
 public static int CreateWork(TeamWorkInfo workinfo, out string result)
 {
     int workid = 0;
     string members = workinfo.Members;
     workinfo.Members = "";
     workid = Data.DbProvider.GetInstance().CreateWork(workinfo);
     result = Data.DbProvider.GetInstance().SetWorkMemberList(members, workid);
     SASCache.GetCacheService().RemoveObject("/Sirius/WorkList_" + workinfo.Teamid);
     return workid;
 }
 private void BuildWorkInfo(int aid)
 {
     TeamWorkInfo tinfo = new TeamWorkInfo();
     tinfo = spb.GetWorkInfo(aid);
     title.Text = tinfo.Name;
     starttime.Text = tinfo.Start;
     endtime.Text = tinfo.End;
     message.Text = tinfo.Worddesc;
     listpic.Text = tinfo.Img;
     listbak.Text = tinfo.Imgbak;
     url.Text = tinfo.Url;
     moderators.Text = tinfo.Members;
     teams.SelectedValue = tinfo.Teamid.ToString();
 }
 private TeamWorkInfo LoadActInfo()
 {
     TeamWorkInfo tainfo = new TeamWorkInfo();
     tainfo.Id = wid;
     tainfo.Name = title.Text.Trim();
     tainfo.Start = starttime.Text.Trim();
     tainfo.End = endtime.Text.Trim();
     tainfo.Worddesc = message.Text.Trim();
     tainfo.Img = listpic.Text.Trim();
     tainfo.Imgbak = listbak.Text.Trim();
     tainfo.Teamid = TypeConverter.StrToInt(teams.SelectedValue, 0);
     tainfo.Url = url.Text.Trim();
     tainfo.Members = moderators.Text.Trim();
     return tainfo;
 }
示例#4
0
 public int CreateWork(TeamWorkInfo workinfo)
 {
     DbParameter[] parms = {
                             DbHelper.MakeInParam("@name", (DbType)SqlDbType.NVarChar,50,workinfo.Name),
                             DbHelper.MakeInParam("@start", (DbType)SqlDbType.SmallDateTime,4,workinfo.Start),
                             DbHelper.MakeInParam("@end", (DbType)SqlDbType.SmallDateTime,4,workinfo.End),
                             DbHelper.MakeInParam("@worddesc", (DbType)SqlDbType.Text,0,workinfo.Worddesc),
                             DbHelper.MakeInParam("@url", (DbType)SqlDbType.VarChar,200,workinfo.Url),
                             DbHelper.MakeInParam("@img", (DbType)SqlDbType.VarChar,200,workinfo.Img),
                             DbHelper.MakeInParam("@imgbak", (DbType)SqlDbType.VarChar,200,workinfo.Imgbak),
                             DbHelper.MakeInParam("@teamid", (DbType)SqlDbType.Int,4,workinfo.Teamid),
                             DbHelper.MakeInParam("@members", (DbType)SqlDbType.VarChar,500,workinfo.Members)
                           };
     string commandText = String.Format("INSERT INTO [{0}teamwork] ([name],[start],[end],[worddesc],[url],[img],[imgbak],[teamid],[members])VALUES(@name,@start,@end,@worddesc,@url,@img,@imgbak,@teamid,@members);SELECT SCOPE_IDENTITY()", BaseConfigs.GetTablePrefix);
     return TypeConverter.ObjectToInt(DbHelper.ExecuteScalar(CommandType.Text, commandText, parms));
 }
示例#5
0
 public static TeamWorkInfo GetWorkEntity(IDataReader reader)
 {
     if (reader.Read())
     {
         TeamWorkInfo tinfo = new TeamWorkInfo();
         tinfo.Id = TypeConverter.StrToInt(reader["id"].ToString());
         tinfo.Name = reader["name"].ToString();
         tinfo.Start = reader["start"].ToString();
         tinfo.End = reader["end"].ToString();
         tinfo.Worddesc = reader["worddesc"].ToString();
         tinfo.Url = reader["url"].ToString();
         tinfo.Img = reader["img"].ToString();
         tinfo.Imgbak = reader["imgbak"].ToString();
         tinfo.Teamid = TypeConverter.StrToInt(reader["teamid"].ToString());
         tinfo.Members = reader["members"].ToString();
         reader.Close();
         return tinfo;
     }
     return null;
 }
示例#6
0
 /// <summary>
 /// 团队成果信息实体列表
 /// </summary>
 public static List<TeamWorkInfo> GetTeamWorkInfoList(IDataReader reader)
 {
     List<TeamWorkInfo> tlist = new List<TeamWorkInfo>();
     while (reader.Read())
     {
         TeamWorkInfo tinfo = new TeamWorkInfo();
         tinfo.Id = TypeConverter.StrToInt(reader["id"].ToString());
         tinfo.Name = reader["name"].ToString();
         tinfo.Start = reader["start"].ToString();
         tinfo.End = reader["end"].ToString();
         tinfo.Worddesc = reader["worddesc"].ToString();
         tinfo.Url = reader["url"].ToString();
         tinfo.Img = reader["img"].ToString();
         tinfo.Imgbak = reader["imgbak"].ToString();
         tinfo.Teamid = TypeConverter.StrToInt(reader["teamid"].ToString());
         tinfo.Members = reader["members"].ToString();
         tlist.Add(tinfo);
     }
     reader.Close();
     return tlist;
 }
示例#7
0
 /// <summary>
 /// 创建团队成果信息
 /// </summary>
 /// <param name="workinfo">成果实体</param>
 public override int CreateWork(TeamWorkInfo workinfo, out string result)
 {
     return Sirius.CreateWork(workinfo, out result);
 }
示例#8
0
 /// <summary>
 /// 成果信息更新
 /// </summary>
 public override void UpdateWorkInfo(TeamWorkInfo tinfo, out string result)
 {
     Sirius.UpdateWorkInfo(tinfo, out result);
 }
示例#9
0
 public void UpdateWorkInfo(TeamWorkInfo workinfo)
 {
     DbParameter[] parms = {
                             DbHelper.MakeInParam("@id", (DbType)SqlDbType.Int,4,workinfo.Id),
                             DbHelper.MakeInParam("@name", (DbType)SqlDbType.NVarChar,50,workinfo.Name),
                             DbHelper.MakeInParam("@start", (DbType)SqlDbType.SmallDateTime,4,workinfo.Start),
                             DbHelper.MakeInParam("@end", (DbType)SqlDbType.SmallDateTime,4,workinfo.End),
                             DbHelper.MakeInParam("@worddesc", (DbType)SqlDbType.Text,0,workinfo.Worddesc),
                             DbHelper.MakeInParam("@url", (DbType)SqlDbType.VarChar,200,workinfo.Url),
                             DbHelper.MakeInParam("@img", (DbType)SqlDbType.VarChar,200,workinfo.Img),
                             DbHelper.MakeInParam("@imgbak", (DbType)SqlDbType.VarChar,200,workinfo.Imgbak),
                             DbHelper.MakeInParam("@teamid", (DbType)SqlDbType.Int,4,workinfo.Teamid),
                             DbHelper.MakeInParam("@members", (DbType)SqlDbType.VarChar,500,workinfo.Members)
                           };
     string commandText = String.Format("UPDATE [sas_teamwork] SET [name] = @name,[start] = @start,[end] = @end,[worddesc] = @worddesc,[url] = @url,[img] = @img,[imgbak] = @imgbak,[teamid] = @teamid,[members] = @members	WHERE id=@id", BaseConfigs.GetTablePrefix);
     DbHelper.ExecuteNonQuery(CommandType.Text, commandText, parms);
 }
示例#10
0
 /// <summary>
 /// 创建团队成果信息
 /// </summary>
 /// <param name="workinfo">成果实体</param>
 public abstract int CreateWork(TeamWorkInfo workinfo, out string result);
示例#11
0
 /// <summary>
 /// 成果信息更新
 /// </summary>
 public abstract void UpdateWorkInfo(TeamWorkInfo tinfo, out string result);
示例#12
0
 /// <summary>
 /// 成果信息更新
 /// </summary>
 public static void UpdateWorkInfo(TeamWorkInfo tinfo,out string result)
 {
     string members = tinfo.Members;
     tinfo.Members = "";
     Data.DbProvider.GetInstance().UpdateWorkInfo(tinfo);
     result = Data.DbProvider.GetInstance().SetWorkMemberList(members, tinfo.Id);
     SASCache.GetCacheService().RemoveObject("/Sirius/WorkList_" + tinfo.Teamid);
 }