예제 #1
0
파일: Results.cs 프로젝트: zgying/CRMWeiXin
        public Int32 Insert()
        {
            DAL.SurveyResult Record = new DAL.SurveyResult
            {
                CreateDate = DateTime.Now,
                PortalID = this.PortalID
            };

            this.context.AddToSurveyResults(Record);
            this.context.SaveChanges();
            return Record.ResultID;
        }
예제 #2
0
 /// <summary>
 /// Create a new SurveyResult object.
 /// </summary>
 /// <param name="resultID">Initial value of the ResultID property.</param>
 /// <param name="createDate">Initial value of the CreateDate property.</param>
 /// <param name="portalID">Initial value of the PortalID property.</param>
 public static SurveyResult CreateSurveyResult(global::System.Int32 resultID, global::System.DateTime createDate, global::System.Int32 portalID)
 {
     SurveyResult surveyResult = new SurveyResult();
     surveyResult.ResultID = resultID;
     surveyResult.CreateDate = createDate;
     surveyResult.PortalID = portalID;
     return surveyResult;
 }
예제 #3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the SurveyResults EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToSurveyResults(SurveyResult surveyResult)
 {
     base.AddObject("SurveyResults", surveyResult);
 }