public void AddParameter(string categoryName, string parameterName, string parameterValue) { ParameterCategory parameterCategory; //check categoryname is exist, if not add try { parameterCategory = ParameterCategoryDao.GetByName(categoryName); } catch (NoDataFoundException nfe) { parameterCategory = new ParameterCategory() { CategoryName = categoryName }; ParameterCategoryDao.Add(parameterCategory); } catch (Exception ex) { throw ex; } SystemParameter systemParameter = new SystemParameter() { CategoryId = parameterCategory.CategoryId, ParameterName = parameterName, ParameterValue = parameterValue }; SystemParameterDao.Add(systemParameter); }
public void UpdateFrom(ParameterCategory t) { CategoryName = t.CategoryName; UpdateDate = DateTime.Now; }