Exemple #1
0
        public OperationResult Delete(string PropertyID)
        {
            var model = SYS_PROPERTYList.FirstOrDefault(t => t.PropertyID == PropertyID);

            SYS_PROPERTYRepository.Delete(model);
            return(new OperationResult(OperationResultType.Success, "successfully deleted"));
        }
Exemple #2
0
        public OperationResult Update(UpdateSYS_PROPERTYModel model)
        {
            var entity = SYS_PROPERTYList.First(t => t.PropertyID == model.PropertyID);

            entity.PropertyID   = model.PropertyID;
            entity.PropertyName = model.PropertyName;
            entity.Remark       = model.Remark;
            entity.Status       = model.Status;

            SYS_PROPERTYRepository.Update(entity);
            return(new OperationResult(OperationResultType.Success, "update completed"));
        }
Exemple #3
0
        public OperationResult Insert(SYS_PROPERTYModel model)
        {
            var entity = new SYS_PROPERTY
            {
                PropertyID   = model.PropertyID,
                PropertyName = model.PropertyName,
                Remark       = model.Remark,
                Status       = model.Status,
            };

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