コード例 #1
0
        public void AddNewSurveyIPRange(SurveyIPRangeData updIPRange)
        {
            SqlConnection connection = new SqlConnection(DbConnection.NewDbConnectionString);
            SqlCommand command = new SqlCommand("vts_spSurveyIPRangeAddNew", connection);
            command.CommandType = CommandType.StoredProcedure;
            command.Parameters.Add(new SqlParameter("@SurveyID", updIPRange.SurveyIPRange[0].SurveyId));
            command.Parameters.Add(new SqlParameter("@IPStart", updIPRange.SurveyIPRange[0].IPStart));
            command.Parameters.Add(new SqlParameter("@IPEnd", updIPRange.SurveyIPRange[0].IPEnd));

            DbConnection.db.UpdateDataSet(updIPRange, "SurveyIPRange", command, new SqlCommand(), new SqlCommand(), UpdateBehavior.Transactional);
        }
コード例 #2
0
        public void AddNewSurveyIPRange(SurveyIPRangeData updIPRange)
        {
            SqlConnection connection = new SqlConnection(DbConnection.NewDbConnectionString);
            SqlCommand    command    = new SqlCommand("vts_spSurveyIPRangeAddNew", connection);

            command.CommandType = CommandType.StoredProcedure;
            command.Parameters.Add(new SqlParameter("@SurveyID", updIPRange.SurveyIPRange[0].SurveyId));
            command.Parameters.Add(new SqlParameter("@IPStart", updIPRange.SurveyIPRange[0].IPStart));
            command.Parameters.Add(new SqlParameter("@IPEnd", updIPRange.SurveyIPRange[0].IPEnd));

            DbConnection.db.UpdateDataSet(updIPRange, "SurveyIPRange", command, new SqlCommand(), new SqlCommand(), UpdateBehavior.Transactional);
        }
コード例 #3
0
        public SurveyIPRangeData GetAllSurveyIPRanges(int surveyID)
        {
            SurveyIPRangeData surveyIPRangeData = new SurveyIPRangeData();


            ArrayList commandParameters = new ArrayList();
            {
                commandParameters.Add(new SqlParameter("@SurveyId", surveyID).SqlValue);
            }

            DbConnection.db.LoadDataSet( "vts_spIPRangeGetForSurvey",surveyIPRangeData, new string[]{"surveyIPRange"},commandParameters.ToArray());

            return surveyIPRangeData;
        }
コード例 #4
0
        public SurveyIPRangeData GetAllSurveyIPRanges(int surveyID)
        {
            SurveyIPRangeData surveyIPRangeData = new SurveyIPRangeData();


            ArrayList commandParameters = new ArrayList();

            {
                commandParameters.Add(new SqlParameter("@SurveyId", surveyID).SqlValue);
            }

            DbConnection.db.LoadDataSet("vts_spIPRangeGetForSurvey", surveyIPRangeData, new string[] { "surveyIPRange" }, commandParameters.ToArray());

            return(surveyIPRangeData);
        }
        private void InsertUpdateIPRange(bool isInsert, int?surveyIPRangeId, int surveyId, string IPStart, string IPEnd)
        {
            SurveyIPRangeData data = new SurveyIPRangeData();

            SurveyIPRangeData.SurveyIPRangeRow row = data.SurveyIPRange.NewSurveyIPRangeRow();
            row.SurveyId = surveyId;
            row.IPStart  = IPStart;
            row.IPEnd    = IPEnd;

            row.SurveyIPRangeId = surveyIPRangeId ?? 0;

            data.SurveyIPRange.Rows.Add(row);
            if (isInsert)
            {
                new SurveyIPRange().AddNewSurveyIPRange(data);
            }
            new SurveyIPRange().UpdateIPRange(data);
        }
コード例 #6
0
        private void InsertUpdateIPRange(bool isInsert,int? surveyIPRangeId,int surveyId, string IPStart, string IPEnd)
        {

            SurveyIPRangeData data = new SurveyIPRangeData();

            SurveyIPRangeData.SurveyIPRangeRow row = data.SurveyIPRange.NewSurveyIPRangeRow();
            row.SurveyId = surveyId;
            row.IPStart = IPStart;
            row.IPEnd = IPEnd;

            row.SurveyIPRangeId = surveyIPRangeId ?? 0;
               
            data.SurveyIPRange.Rows.Add(row);
            if (isInsert)
                new SurveyIPRange().AddNewSurveyIPRange(data);
            new SurveyIPRange().UpdateIPRange(data);

        }
コード例 #7
0
 public void AddNewSurveyIPRange(SurveyIPRangeData data)
 {
     SurveyIPRangeFactory.Create().AddNewSurveyIPRange(data);
 }
コード例 #8
0
 public void UpdateIPRange(SurveyIPRangeData data)
 {
     SurveyIPRangeFactory.Create().UpdateSurveyIPRange(data);
 }
コード例 #9
0
 public void AddNewSurveyIPRange(SurveyIPRangeData data)
 {
     SurveyIPRangeFactory.Create().AddNewSurveyIPRange(data);
 }
コード例 #10
0
 public void UpdateIPRange(SurveyIPRangeData data)
 {
     SurveyIPRangeFactory.Create().UpdateSurveyIPRange(data);
 }