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); }
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 ); }
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; }
internal void UpdateSuperCategory(SuperCategory supercategory) { string query = SuperCategoryQuery.getQueryUpdateSuperCategory(supercategory); SuperCategoryQuery.ParseDataSetToSuperCategory(_provider.queryExecute(query,UPDATE_TYPE)); }
internal void SaveSuperCategory(SuperCategory supercategory) { string query = SuperCategoryQuery.getQuerySaveSuperCategory(supercategory); SuperCategoryQuery.ParseDataSetToSuperCategory(_provider.queryExecute(query,INSERT_TYPE)); }
public void Update(SuperCategory supercategory) { _repositoryHelper.UpdateSuperCategory(supercategory); }
public void Save(SuperCategory supercategory) { _repositoryHelper.SaveSuperCategory(supercategory); }
public bool Exists(SuperCategory supercategory) { return Get(supercategory.Id) != null; }