예제 #1
0
 public static string getQueryUpdateLoadType(LoadType loadType)
 {
     return string.Format("UPDATE {0} SET {1}='{2}', {3}='{4}',{5}='{6}'WHERE {7}='{8}'",
          ID_TABLE_LOADTYPE,
          ID_DESCRIPTION_LOADTYPE, loadType.Description,
          ID_UPDATETIME_LOADTYPE, loadType.UpdateLocalDateTime.ToString(DATETIMEFORMATINSERT_LOADTYPE),
          ID_UPDATEUSER_LOADTYPE, loadType.UpdateUser,
          ID_ID_LOADTYPE, loadType.Id
         );
 }
예제 #2
0
 public static string getQuerySaveLoadType(LoadType loadType)
 {
     return string.Format("INSERT INTO {0} VALUES('{1}','{2}','{3}','{4}','{5}','{6}')", ID_TABLE_LOADTYPE,
         loadType.Id,
         loadType.Description,
         loadType.LocalInsertTime.ToString(DATETIMEFORMATINSERT_LOADTYPE),
         loadType.InsertUser,
         loadType.UpdateLocalDateTime.ToString(DATETIMEFORMATINSERT_LOADTYPE),
         loadType.UpdateUser);
 }
예제 #3
0
        public static IList<LoadType> ParseDataSetToLoadType(DataTable dataTable)
        {
            IList<LoadType> loadTypeList = new List<LoadType>();
            foreach (DataRow row in dataTable.Rows)
            {
                LoadType loadType = new LoadType()
                {
                    Id = row[POSITION_ID_LOADTYPE].ToString(),
                    Description = row[POSITION_DESCRIPTION_LOADTYPE].ToString(),
                    LocalInsertTime = getDateTime(row[POSITION_INSERTTIME_LOADTYPE].ToString(), DATETIMEFORMATINSERT_LOADTYPE),
                    InsertUser = row[POSITION_INSERTUSER_LOADTYPE].ToString(),
                    UpdateLocalDateTime = getDateTime(row[POSITION_UPDATETIME_LOADTYPE].ToString(), DATETIMEFORMATINSERT_LOADTYPE),
                    UpdateUser = row[POSITION_UPDATEUSER_LOADTYPE].ToString()
                };
                loadTypeList.Add(loadType);
            }

            return loadTypeList;
        }
예제 #4
0
 public void Update(LoadType loadType)
 {
     _repositoryHelper.UpdateLoadType(loadType);
 }
예제 #5
0
 public void Save(LoadType loadType)
 {
     _repositoryHelper.SaveLoadType(loadType);
 }
예제 #6
0
 public bool Exists(LoadType loadType)
 {
     return Get(loadType.Id) != null;
 }
예제 #7
0
 internal void UpdateLoadType(LoadType loadType)
 {
     string query = LoadTypeQuery.getQueryUpdateLoadType(loadType);
     LoadTypeQuery.ParseDataSetToLoadType(_provider.queryExecute(query,UPDATE_TYPE));
 }
예제 #8
0
 internal void SaveLoadType(LoadType loadType)
 {
     string query = LoadTypeQuery.getQuerySaveLoadType(loadType);
     LoadTypeQuery.ParseDataSetToLoadType(_provider.queryExecute(query,INSERT_TYPE));
 }