Example #1
0
        public OperationResult Delete(string ID)
        {
            var model = PROD_PROPERTIESList.FirstOrDefault(t => t.ID == ID);

            PROD_PROPERTIESRepository.Delete(model);
            return(new OperationResult(OperationResultType.Success, "successfully deleted"));
        }
Example #2
0
        public OperationResult Update(UpdatePROD_PROPERTIESModel model)
        {
            var entity = PROD_PROPERTIESList.First(t => t.ID == model.ID);

            entity.ID            = model.ID;
            entity.ProductNo     = model.ProductNo;
            entity.PropertyID    = model.PropertyID;
            entity.PropertyValue = model.PropertyValue;
            entity.PLevel        = model.PLevel;
            entity.ParentID      = model.ParentID;
            entity.RelationCode  = model.RelationCode;
            entity.RowID         = model.RowID;
            entity.RealProductNo = model.RealProductNo;
            entity.DisplayOrder  = model.DisplayOrder;
            entity.Remark        = model.Remark;
            entity.Status        = model.Status;

            PROD_PROPERTIESRepository.Update(entity);
            return(new OperationResult(OperationResultType.Success, "update completed"));
        }
Example #3
0
        public OperationResult Insert(PROD_PROPERTIESModel model)
        {
            var entity = new PROD_PROPERTIES
            {
                ID            = model.ID,
                ProductNo     = model.ProductNo,
                PropertyID    = model.PropertyID,
                PropertyValue = model.PropertyValue,
                PLevel        = model.PLevel,
                ParentID      = model.ParentID,
                RelationCode  = model.RelationCode,
                RowID         = model.RowID,
                RealProductNo = model.RealProductNo,
                DisplayOrder  = model.DisplayOrder,
                Remark        = model.Remark,
                Status        = model.Status,
            };

            PROD_PROPERTIESRepository.Insert(entity);
            return(new OperationResult(OperationResultType.Success, "Added successfully"));
        }