/// <summary> /// 前台发问题 /// </summary> /// <param name="model"></param> public void AddQuest(ref QA_QuestionMod model, bool isquest) { TransactionOptions options = new TransactionOptions(); options.IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted; options.Timeout = TransactionManager.DefaultTimeout; using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, options)) { using (SQLData m_data = new SQLData()) { model.SysNo = m_data.GetSequence("QA_Question_Seq"); } Add(model); AppMod.User.USR_RecordMod m_record = new AppMod.User.USR_RecordMod(); m_record.CustomerSysNo = model.CustomerSysNo; m_record.TargetSysNo = model.SysNo; m_record.TS = DateTime.Now; m_record.Type = (int)AppEnum.ActionType.AddQuest; User.USR_RecordBll.GetInstance().Add(m_record); if (isquest) { User.USR_CustomerBll.GetInstance().AddPoint(0 - model.Award, model.CustomerSysNo); User.USR_CustomerBll.GetInstance().AddCount(model.CustomerSysNo, 1, 0, 0, 0, 0, 0, 0, 0, 0); } else { User.USR_CustomerBll.GetInstance().AddPoint(AppConst.TalkPoint, model.CustomerSysNo); User.USR_CustomerBll.GetInstance().AddCount(model.CustomerSysNo, 0, 0, 0, 0, 1, 0, 0, 0, 0); } User.USR_CustomerBll.GetInstance().AddExp(AppConst.TalkExp, model.CustomerSysNo); scope.Complete(); } }