Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
        /// <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;
        }
Exemplo n.º 3
0
 partial void DeleteBrand(Brand instance);
Exemplo n.º 4
0
 partial void UpdateBrand(Brand instance);
Exemplo n.º 5
0
 partial void InsertBrand(Brand instance);