public virtual bool Edit(DbConn PubConn, tb_version_model model)
        {
            List<ProcedureParameter> Par = new List<ProcedureParameter>()
            {
                    
					//
					new ProcedureParameter("@taskid",    model.taskid),
					//
					new ProcedureParameter("@version",    model.version),
					//
					new ProcedureParameter("@versioncreatetime",    model.versioncreatetime),
					//压缩文件二进制文件
					new ProcedureParameter("@zipfile",    model.zipfile),
					//
					new ProcedureParameter("@zipfilename",    model.zipfilename)
            };
			Par.Add(new ProcedureParameter("@id",  model.id));

            int rev = PubConn.ExecuteSql("update tb_version set taskid=@taskid,version=@version,versioncreatetime=@versioncreatetime,zipfile=@zipfile,zipfilename=@zipfilename where id=@id", Par);
            return rev == 1;

        }
        public virtual bool Add(DbConn PubConn, tb_version_model model)
        {

            List<ProcedureParameter> Par = new List<ProcedureParameter>()
                {
					
					//
					new ProcedureParameter("@taskid",    model.taskid),
					//
					new ProcedureParameter("@version",    model.version),
					//
					new ProcedureParameter("@versioncreatetime",    model.versioncreatetime),
					//压缩文件二进制文件
					new ProcedureParameter("@zipfile",    model.zipfile),
					//
					new ProcedureParameter("@zipfilename",    model.zipfilename)   
                };
            int rev = PubConn.ExecuteSql(@"insert into tb_version(taskid,version,versioncreatetime,zipfile,zipfilename)
										   values(@taskid,@version,@versioncreatetime,@zipfile,@zipfilename)", Par);
            return rev == 1;

        }
		public virtual tb_version_model CreateModel(DataRow dr)
        {
            var o = new tb_version_model();
			
			//
			if(dr.Table.Columns.Contains("id"))
			{
				o.id = dr["id"].Toint();
			}
			//
			if(dr.Table.Columns.Contains("taskid"))
			{
				o.taskid = dr["taskid"].Toint();
			}
			//
			if(dr.Table.Columns.Contains("version"))
			{
				o.version = dr["version"].Toint();
			}
			//
			if(dr.Table.Columns.Contains("versioncreatetime"))
			{
				o.versioncreatetime = dr["versioncreatetime"].ToDateTime();
			}
			//压缩文件二进制文件
			if(dr.Table.Columns.Contains("zipfile"))
			{
				o.zipfile = dr["zipfile"].ToBytes();
			}
			//
			if(dr.Table.Columns.Contains("zipfilename"))
			{
				o.zipfilename = dr["zipfilename"].Tostring();
			}
			return o;
        }