Пример #1
0
        public bool AddFeedBackAnalysis(string conStr, FBEntry fB)
        {
            // Creating Connection
            using (SqlConnection con = new SqlConnection(conStr))
            {
                SqlCommand command = new SqlCommand();
                command.Connection = con;

                command.Parameters.Add(new SqlParameter("@FeedBackCategoryId", SqlDbType.Int));
                command.Parameters["@FeedBackCategoryId"].Value = fB.FeedBackCategoryId;

                command.Parameters.Add(new SqlParameter("@UserId", SqlDbType.Int));
                command.Parameters["@UserId"].Value = fB.UserId;

                command.Parameters.Add(new SqlParameter("@ProductId", SqlDbType.Int));
                command.Parameters["@ProductId"].Value = fB.ProductId;

                command.Parameters.Add(new SqlParameter("@FeedBackDesc", SqlDbType.VarChar));
                command.Parameters["@FeedBackDesc"].Value = fB.FeedBackDesc;

                command.Parameters.Add(new SqlParameter("@FeedBackIndex", SqlDbType.Float));
                command.Parameters["@FeedBackIndex"].Value = fB.FeedBackIndex;

                command.CommandText = "sp_AddFeedBack";
                command.CommandType = CommandType.StoredProcedure;
                con.Open();
                bool res = command.ExecuteNonQuery() > 0 ? true : false;
                return(res);
            }
        }
        public bool Post(FBEntry fbDataObj)
        {
            string conStr = _iconfiguration.GetValue <string>("FBASetting:ConnectionString");

            return(fbaBObj.AddFeedBackAnalysis(conStr, fbDataObj));
        }
Пример #3
0
 public bool AddFeedBackAnalysis(string conStr, FBEntry fbDataObj)
 {
     fbDataObj.FeedBackCategoryId = AnalyseFeedBackCategory(fbDataObj.FeedBackDesc);
     fbDataObj.FeedBackIndex      = AnalyseFeedBackSentiment(fbDataObj.FeedBackDesc);
     return(fbaDObj.AddFeedBackAnalysis(conStr, fbDataObj));
 }