Exemplo n.º 1
0
 public static string getQuerySaveSuperCategory(SuperCategory superCategory)
 {
     return string.Format("INSERT INTO {0} VALUES('{1}','{2}','{3}','{4}','{5}','{6}')", ID_TABLE_SUPERCATEGORY,
         superCategory.Id,
         superCategory.Description,
         superCategory.LocalInsertTime.ToString(DATETIMEFORMATINSERT_SUPERCATEGORY),
         superCategory.InsertUser,
         superCategory.UpdateLocalDateTime.ToString(DATETIMEFORMATINSERT_SUPERCATEGORY),
         superCategory.UpdateUser);
 }
Exemplo n.º 2
0
 public static string getQueryUpdateSuperCategory(SuperCategory superCategory)
 {
     return string.Format("UPDATE {0} SET {1}='{2}', {3}='{4}',{5}='{6}'WHERE {7}='{8}'",
          ID_TABLE_SUPERCATEGORY,
          ID_DESCRIPTION_SUPERCATEGORY, superCategory.Description,
          ID_UPDATETIME_SUPERCATEGORY, superCategory.UpdateLocalDateTime.ToString(DATETIMEFORMATINSERT_SUPERCATEGORY),
          ID_UPDATEUSER_SUPERCATEGORY, superCategory.UpdateUser,
          ID_ID_SUPERCATEGORY, superCategory.Id
         );
 }
Exemplo n.º 3
0
        public static IList<SuperCategory> ParseDataSetToSuperCategory(DataTable dataTable)
        {
            IList<SuperCategory> superCategoryList = new List<SuperCategory>();
            foreach (DataRow row in dataTable.Rows)
            {
                SuperCategory superCategory = new SuperCategory()
                {
                    Id = row[POSITION_ID_SUPERCATEGORY].ToString(),
                    Description = row[POSITION_DESCRIPTION_SUPERCATEGORY].ToString(),
                    LocalInsertTime = getDateTime(row[POSITION_INSERTTIME_SUPERCATEGORY].ToString(), DATETIMEFORMATINSERT_SUPERCATEGORY),
                    InsertUser = row[POSITION_INSERTUSER_SUPERCATEGORY].ToString(),
                    UpdateLocalDateTime = getDateTime(row[POSITION_UPDATETIME_SUPERCATEGORY].ToString(), DATETIMEFORMATINSERT_SUPERCATEGORY),
                    UpdateUser = row[POSITION_UPDATEUSER_SUPERCATEGORY].ToString()
                };
                superCategoryList.Add(superCategory);
            }

            return superCategoryList;
        }
Exemplo n.º 4
0
 internal void UpdateSuperCategory(SuperCategory supercategory)
 {
     string query = SuperCategoryQuery.getQueryUpdateSuperCategory(supercategory);
     SuperCategoryQuery.ParseDataSetToSuperCategory(_provider.queryExecute(query,UPDATE_TYPE));
 }
Exemplo n.º 5
0
 internal void SaveSuperCategory(SuperCategory supercategory)
 {
     string query = SuperCategoryQuery.getQuerySaveSuperCategory(supercategory);
     SuperCategoryQuery.ParseDataSetToSuperCategory(_provider.queryExecute(query,INSERT_TYPE));
 }
Exemplo n.º 6
0
 public void Update(SuperCategory supercategory)
 {
     _repositoryHelper.UpdateSuperCategory(supercategory);
 }
Exemplo n.º 7
0
 public void Save(SuperCategory supercategory)
 {
     _repositoryHelper.SaveSuperCategory(supercategory);
 }
Exemplo n.º 8
0
 public bool Exists(SuperCategory supercategory)
 {
     return Get(supercategory.Id) != null;
 }