public void InsertBrand(SaveDataModel inputObject) { // Get sysdate var currentDate = DateTime.Now; // Set item var entity = new Brand(); entity.BrandCd = inputObject.BrandCd; entity.BrandName = inputObject.BrandName; entity.BrandSearchName = inputObject.BrandSearchName; entity.FileId = inputObject.FileId; entity.Notes = inputObject.Notes; entity.SortKey = inputObject.SortKey; entity.CreateUser = PageHelper.UserName; entity.CreateDate = currentDate; entity.UpdateUser = PageHelper.UserName; entity.UpdateDate = currentDate; entity.DeleteFlag = inputObject.DeleteFlag; EntityManager.Brands.InsertOnSubmit(entity); // Submit EntityManager.SubmitChanges(); }
/// <summary> /// Get infomation /// </summary> /// <param name="inputObject">DataModel</param> /// <returns>DataModel</returns> private InitDataModel GetInfo(InitDataModel inputObject) { // Local variable declaration InitDataModel getResult = null; MCodeCom mCodeCom = null; AdminBrandEntryDao adminBrandEntryDao = null; // Variable initialize getResult = new InitDataModel(); mCodeCom = new MCodeCom(); adminBrandEntryDao = new AdminBrandEntryDao(); // Get data var listDeleteFlag = mCodeCom.GetListCode(Logics.GROUP_DELETE_FLAG, null, false, false); var brand = new Brand(); if (!IsAdd) brand = adminBrandEntryDao.GetSingleBrand(inputObject.BrandCd); else brand.FileId = DataHelper.GetUniqueKey(); // Set value getResult.ListDeleteFlag = listDeleteFlag; getResult.Brand = brand; // Return value return getResult; }
partial void DeleteBrand(Brand instance);
partial void UpdateBrand(Brand instance);
partial void InsertBrand(Brand instance);