internal int IUDQA(BOQAManage _boqamng) { int returnvalue = default(int); using (SqlConnection _sqlconnection = ConnectionInfo.GetConnection()) { _sqlcommand = new SqlCommand(); _sqlcommand.Connection = _sqlconnection; _sqlcommand.CommandText = "SP_IUDQA"; _sqlcommand.CommandType = CommandType.StoredProcedure; _sqlconnection.Open(); _sqlcommand.Parameters.AddWithValue("@QAId", _boqamng.QAId); _sqlcommand.Parameters.AddWithValue("@ExamCodeId", _boqamng.ExamCodeId); _sqlcommand.Parameters.AddWithValue("@ExamCode", _boqamng.ExamCode); _sqlcommand.Parameters.AddWithValue("@QuestionTypeId", _boqamng.QuestionTypeId); _sqlcommand.Parameters.AddWithValue("@Score", _boqamng.Score); _sqlcommand.Parameters.AddWithValue("@Question", _boqamng.Question); _sqlcommand.Parameters.AddWithValue("@NoofAnswer", _boqamng.NoofAnswer); _sqlcommand.Parameters.AddWithValue("@Explanation", _boqamng.Explanation); _sqlcommand.Parameters.AddWithValue("@MerchantId", _boqamng.MerchantId); _sqlcommand.Parameters.AddWithValue("@IsActive", _boqamng.IsActive); _sqlcommand.Parameters.AddWithValue("@IsDelete", _boqamng.IsDelete); _sqlcommand.Parameters.AddWithValue("@CreatedBy", _boqamng.CreatedBy); _sqlcommand.Parameters.AddWithValue("@CreatedDate", _boqamng.CreatedDate); _sqlcommand.Parameters.AddWithValue("@UpdatedBy", _boqamng.UpdatedBy); _sqlcommand.Parameters.AddWithValue("@UpdatedDate", _boqamng.UpdatedDate); _sqlcommand.Parameters.AddWithValue("@Resource", _boqamng.Resource); _sqlcommand.Parameters.AddWithValue("@Exhibit", _boqamng.Exhibit); _sqlcommand.Parameters.AddWithValue("@Topology", _boqamng.Topology); _sqlcommand.Parameters.AddWithValue("@Scenario", _boqamng.Scenario); _sqlcommand.Parameters.AddWithValue("@Event", _boqamng.Event); _sqlcommand.Parameters.AddWithValue("@returnValue", 0).Direction = System.Data.ParameterDirection.InputOutput; try { _sqlcommand.ExecuteNonQuery(); returnvalue = Convert.ToInt32(_sqlcommand.Parameters["@returnValue"].Value); } catch (SqlException sqlex) { Common.LogError(sqlex); } catch (StackOverflowException stackex) { Common.LogError(stackex); } catch (Exception ex) { Common.LogError(ex); } finally { _sqlconnection.Close(); _sqlcommand.Dispose(); } } return(returnvalue); }
internal int Delete(BOQAManage _boqamng) { return(_daqamng.IUDQA(_boqamng)); }
internal int Insert(BOQAManage _boqamng) { return(_daqamng.IUDQA(_boqamng)); }