/// <summary> /// 保存试题信息 /// </summary> public string SaveOption() { var quesOptionsBLL = new QuesOptionBLL(this.CurrentUserInfo); string content = string.Empty; string error = ""; var responseData = new ResponseData(); string key = string.Empty; string OptionID = string.Empty; var option = Request("Option"); if (FormatParamValue(option) != null && FormatParamValue(option) != string.Empty) { key = FormatParamValue(option).ToString().Trim(); } if (FormatParamValue(Request("OptionID")) != null && FormatParamValue(Request("OptionID")) != string.Empty) { OptionID = FormatParamValue(Request("OptionID")).ToString().Trim(); } var optionEntity = key.DeserializeJSONTo <QuesOptionEntity>(); if (OptionID.Trim().Length == 0) { optionEntity.OptionsID = Utils.NewGuid(); //questionnairesEntity.Status = 0; //questionnairesEntity.ApplyCount = 0; //questionnairesEntity.CheckInCount = 0; //questionnairesEntity.PostCount = 0; quesOptionsBLL.Create(optionEntity); } else { optionEntity.OptionsID = OptionID; quesOptionsBLL.Update(optionEntity, false); } responseData.success = true; responseData.msg = error; content = responseData.ToJSON(); return(content); }