예제 #1
0
        /// <summary>
        /// 转移已上产的文件
        /// </summary>
        /// <param name="InfoID">资源所属信息ID</param>
        /// <param name="InfoResources">已经上传资源列表</param>
        /// <returns>保存后的资源列表</returns>
        public static List <Tz888.Model.MemberResourceModel> MemberImageTransfer(string FileType, string InfoType, ResourceType rType, MemberResourceProperty rProperty, List <Tz888.Model.MemberResourceModel> InfoResources)
        {
            if (InfoResources == null || InfoResources.Count == 0)
            {
                return(null);
            }

            List <Tz888.Model.MemberResourceModel> Lists = new List <Tz888.Model.MemberResourceModel>();

            foreach (Tz888.Model.MemberResourceModel model in InfoResources)
            {
                Tz888.Model.MemberResourceModel item = new Tz888.Model.MemberResourceModel();
                string OldFile = model.ResourceAddr;
                string NewFile = Tz888.Common.Common.GetUploadFilePath(FileType, InfoType, false);
                NewFile               = Tz888.Common.FileManage.TransferFile(OldFile, NewFile, true, true, false);
                item.ResourceAddr     = NewFile.Replace(@"\", "/");
                item.ResourceDescrib  = model.ResourceDescrib;
                item.IsDel            = false;
                item.remark           = "";
                item.UpDate           = DateTime.Now;
                item.ResourceName     = InfoType;
                item.ResourceTitle    = model.ResourceDescrib;
                item.ResourceType     = (int)rType;
                item.ResourceProperty = (int)rProperty;
                Lists.Add(item);
            }
            return(Lists);
        }
예제 #2
0
        public List <Tz888.Model.MemberResourceModel> GetMemberResourceModel(string LoginName, int ResourceProperty)
        {
            List <Tz888.Model.MemberResourceModel> lists = new List <Tz888.Model.MemberResourceModel>();

            SqlParameter[] parameters = { new SqlParameter("@LoginName",        SqlDbType.Char, 16),
                                          new SqlParameter("@ResourceProperty", SqlDbType.Int, 16)//--登录名
            };
            parameters[0].Value = LoginName;
            parameters[1].Value = ResourceProperty;
            using (SqlDataReader rdr = SqlHelper.ExecuteReader(SqlHelper.ConnectionStringLocalTransaction, CommandType.StoredProcedure, "UP_MemberResourceTab_GetList", parameters))
            {
                while (rdr.Read())
                {
                    Tz888.Model.MemberResourceModel item = new Tz888.Model.MemberResourceModel(rdr.GetString(0).Trim(), rdr.GetString(1).Trim());
                    lists.Add(item);
                }
            }
            return(lists);
        }
예제 #3
0
 public bool AddMemberCert(Tz888.Model.MemberResourceModel model)
 {
     return(dal.AddMemberCert(model));
 }
예제 #4
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(Tz888.Model.MemberResourceModel model)
 {
     dal.Update(model);
 }
예제 #5
0
 /// <summary>
 ///  信息结果页面的上传(EnterpriseRegisterResult.aspx)
 /// </summary>
 public void AddFromResult(Tz888.Model.MemberResourceModel model)
 {
     dal.AddFromResult(model);
 }