public HttpResponseBase TrialRecordSave()
        {
            string json = string.Empty;
            string jsonStr = string.Empty;
            TrialShareQuery query = new TrialShareQuery();
            TrialPictureQuery trialP = new TrialPictureQuery();
            List<TrialPictureQuery> trialPList = new List<TrialPictureQuery>();
            _ITrialPictureMgr = new TrialPictureMgr(mySqlConnectionString);
            try
            {
                query.share_id = Convert.ToInt32(Request["share_id"]);
                #region 處理圖片
                try
                {
                    if (!string.IsNullOrEmpty(Request.Params["picInfo"]))
                    {

                        string[] picInfo = Request.Params["picInfo"].Split(';');
                        for (int i = 0; i < picInfo.Length - 1; i++)
                        {
                            string[] perValue = picInfo[i].Split(',');
                            trialP = new TrialPictureQuery();
                            if (!string.IsNullOrEmpty(perValue[0])) { trialP.share_id = query.share_id; }
                            if (!string.IsNullOrEmpty(perValue[1])) { trialP.image_filename = perValue[1]; }
                            if (!string.IsNullOrEmpty(perValue[2])) { trialP.image_sort = Convert.ToUInt32(perValue[2]); }
                            if (!string.IsNullOrEmpty(perValue[3])) { trialP.image_state = Convert.ToUInt32(perValue[3]); }
                            trialPList.Add(trialP);
                        }
                        _ITrialPictureMgr = new TrialPictureMgr(mySqlConnectionString);
                        _ITrialPictureMgr.SavePic(trialPList, trialP);
                    }
                    else
                    {
                        _ITrialPictureMgr.DeleteAllPic(trialP);
                    }
                }
                catch (Exception ex)
                {
                    Log4NetCustom.LogMessage logMessage = new Log4NetCustom.LogMessage();
                    logMessage.Content = string.Format("TargetSite:{0},Source:{1},Message:{2}", ex.TargetSite.Name, ex.Source, ex.Message);
                    logMessage.MethodName = System.Reflection.MethodBase.GetCurrentMethod().Name;
                    log.Error(logMessage);
                    json = "{failure:true}";
                }
                #endregion
                _ITrialRecordMgr = new TrialRecordMgr(mySqlConnectionString);
                if (!string.IsNullOrEmpty(Request.Params["trial_id"]))
                {
                    query.trial_id = Convert.ToInt32(Request.Params["trial_id"].ToString());
                }
                if (!string.IsNullOrEmpty(Request.Params["user_name"]))
                {
                    query.user_name = Request.Params["user_name"].ToString();
                }
                if (!string.IsNullOrEmpty(Request.Params["user_gender"]))
                {
                    query.user_gender = Convert.ToInt32(Request.Params["user_gender"].ToString());
                }
                if (!string.IsNullOrEmpty(Request.Params["niming"]))
                {
                    if (Request.Params["niming"] == "on")
                    {
                        query.is_show_name = 0;//匿名
                    }
                    else
                    {
                        query.is_show_name = 1;//不匿名
                    }
                }
                if (!string.IsNullOrEmpty(Request.Params["content"]))
                {
                    query.content = Request.Params["content"].ToString();
                }
                if (!string.IsNullOrEmpty(Request.Params["status"]))
                {
                    query.status = Convert.ToInt32(Request.Params["status"].ToString());
                }
                int j = _ITrialRecordMgr.TrialRecordSave(query);
                if (j > 0)
                {
                    json = "{success:true}";
                }
                else
                {
                    json = "{failure:true}";
                }
            }
            catch (Exception ex)
            {
                Log4NetCustom.LogMessage logMessage = new Log4NetCustom.LogMessage();
                logMessage.Content = string.Format("TargetSite:{0},Source:{1},Message:{2}", ex.TargetSite.Name, ex.Source, ex.Message);
                logMessage.MethodName = System.Reflection.MethodBase.GetCurrentMethod().Name;
                log.Error(logMessage);
                json = "{failure:true}";
            }
            this.Response.Clear();
            this.Response.Write(json);
            this.Response.End();
            return this.Response;
        }
 public string QueryPic()
 {
     string json = string.Empty;
     string serverElePath = imgServerPath + elementPath;
     List<TrialPictureQuery> picList = new List<TrialPictureQuery>();
     TrialPictureQuery query = new TrialPictureQuery();
     _ITrialPictureMgr = new TrialPictureMgr(mySqlConnectionString);
     if (!string.IsNullOrEmpty(Request.Params["share_id"]))
     {
         query.share_id = Convert.ToInt32(Request.Params["share_id"]);
     }
     picList = _ITrialPictureMgr.QueryPic(query);
     foreach (var item in picList)
     {
         if (item.image_filename != "")
         {
             //item.image_filename = serverElePath + GetDetailFolder(item.image_filename) + item.image_filename;
             item.image_filename = serverElePath + item.image_filename;
         }
     }
     json = "{success:true,items:" + JsonConvert.SerializeObject(picList) + "}";
     return json;
 }