Example #1
0
 public static string getQuerySaveMeasureType(MeasureType measureType)
 {
     return string.Format("INSERT INTO {0} VALUES('{1}','{2}','{3}','{4}','{5}','{6}')", ID_TABLE_MEASURETYPE,
         measureType.Id,
         measureType.Description,
         measureType.LocalInsertTime.ToString(DATETIMEFORMAT_MEASURETYPE),
         measureType.InsertUser,
         measureType.UpdateLocalDateTime.ToString(DATETIMEFORMAT_MEASURETYPE),
         measureType.UpdateUser);
 }
Example #2
0
 public static string getQueryUpdateMeasureType(MeasureType measureType)
 {
     return string.Format("UPDATE {0} SET {1}='{2}', {3}='{4}',{5}='{6}'WHERE {9}='{10}'",
          ID_TABLE_MEASURETYPE,
          ID_DESCRIPTION_MEASURETYPE, measureType.Description,
          ID_UPDATETIME_MEASURETYPE, measureType.UpdateLocalDateTime.ToString(DATETIMEFORMAT_MEASURETYPE),
          ID_UPDATEUSER_MEASURETYPE, measureType.UpdateUser,
          ID_ID_MEASURETYPE, measureType.Id
         );
 }
Example #3
0
        public static IList<MeasureType> ParseDataSetToMeasureType(DataTable dataTable)
        {
            IList<MeasureType> measureTypeList = new List<MeasureType>();
            foreach (DataRow row in dataTable.Rows)
            {
                MeasureType measureType = new MeasureType()
                {
                    Id = row[POSITION_ID_MEASURETYPE].ToString(),
                    Description = row[POSITION_DESCRIPTION_MEASURETYPE].ToString(),
                    LocalInsertTime = getDateTime(row[POSITION_INSERTTIME_MEASURETYPE].ToString()),
                    InsertUser = row[POSITION_INSERTUSER_MEASURETYPE].ToString(),
                    UpdateLocalDateTime = getDateTime(row[POSITION_UPDATETIME_MEASURETYPE].ToString()),
                    UpdateUser = row[POSITION_UPDATEUSER_MEASURETYPE].ToString()
                };
                measureTypeList.Add(measureType);
            }

            return measureTypeList;
        }
 public void Update(MeasureType measureType)
 {
     _repositoryHelper.UpdateMeasureType(measureType);
 }
 public void Save(MeasureType measureType)
 {
     _repositoryHelper.SaveMeasureType(measureType);
 }
 public bool Exists(MeasureType measureType)
 {
     return Get(measureType.Id) != null;
 }
Example #7
0
 public void UpdateMeasureType(MeasureType measureType)
 {
     string query = MeasureTypeQuery.getQueryUpdateMeasureType(measureType);
     MeasureTypeQuery.ParseDataSetToMeasureType(_provider.queryExecute(query,UPDATE_TYPE));
 }
Example #8
0
 public void SaveMeasureType(MeasureType measureType)
 {
     string query = MeasureTypeQuery.getQuerySaveMeasureType(measureType);
     MeasureTypeQuery.ParseDataSetToMeasureType(_provider.queryExecute(query,INSERT_TYPE));
 }