private void ReSetImgIds() { string SubItemId = RequestData.Get("SubItemId") + ""; var Ent = QuestionItem.FindFirstByProperties(QuestionItem.Prop_SubItemId, SubItemId); this.PageState.Add("ImgIds", Ent.ImgIds + "[]" + Ent.Ext1); }
/// <summary> /// 复制题目选择项 /// </summary> private void CopyItems() { string LastItem = RequestData.Get("LastItem") + ""; if (!string.IsNullOrEmpty(LastItem)) { string gid = Guid.NewGuid().ToString(); var LastEnt = QuestionItem.FindFirstByProperties(QuestionItem.Prop_SubItemId, LastItem); var Ents = QuestionAnswerItem.FindAllByProperty("QuestionItemId", LastItem); foreach (var v in Ents) { QuestionAnswerItem item = new QuestionAnswerItem(); item.Answer = v.Answer; item.IsExplanation = v.IsExplanation; item.IsShowScore = v.IsShowScore; item.QuestionItemId = gid; //* item.SurveyId = v.SurveyId; item.SortIndex = v.SortIndex; item.Score = v.Score; item.DoCreate(); } QuestionItem QiEnt = new QuestionItem(); QiEnt = LastEnt; QiEnt.SubItemId = gid; //* QiEnt.Content = string.Empty; QiEnt.SortIndex = LastEnt.SortIndex + 1; //QiEnt.IsComment = LastEnt.IsComment; //QiEnt.IsMustAnswer = LastEnt.IsMustAnswer; //QiEnt.IsShowScore = LastEnt.IsShowScore; //QiEnt.QuestionType = LastEnt.QuestionType; //QiEnt.SurveyId = LastEnt.SurveyId; //QiEnt.SubItems = LastEnt.SubItems; //QiEnt.Ext1 = LastEnt.Ext1; QiEnt.DoCreate(); this.PageState.Add("SubItemId", gid + "|" + QiEnt.Id); } else { this.PageState.Add("SubItemId", ""); } }