Esempio n. 1
0
        public OperationResult Delete(string ID)
        {
            var model = SALES_QUOTEList.FirstOrDefault(t => t.ID == ID);

            SALES_QUOTERepository.Delete(model);
            return(new OperationResult(OperationResultType.Success, "successfully deleted"));
        }
Esempio n. 2
0
        public OperationResult Update(UpdateSALES_QUOTEModel model)
        {
            var entity = SALES_QUOTEList.First(t => t.ID == model.ID);

            entity.ID         = model.ID;
            entity.CustomerID = model.CustomerID;
            entity.ContactID  = model.ContactID;
            entity.ProductNo  = model.ProductNo;
            entity.Unit       = model.Unit;
            entity.UnitPrice  = model.UnitPrice;
            entity.CreateDate = model.CreateDate;
            entity.Creator    = model.Creator;
            entity.CommText   = model.CommText;
            entity.Status     = model.Status;
            entity.RowID      = model.RowID;

            SALES_QUOTERepository.Update(entity);
            return(new OperationResult(OperationResultType.Success, "update completed"));
        }
Esempio n. 3
0
        public OperationResult Insert(SALES_QUOTEModel model)
        {
            var entity = new SALES_QUOTE
            {
                ID         = model.ID,
                CustomerID = model.CustomerID,
                ContactID  = model.ContactID,
                ProductNo  = model.ProductNo,
                Unit       = model.Unit,
                UnitPrice  = model.UnitPrice,
                CreateDate = model.CreateDate,
                Creator    = model.Creator,
                CommText   = model.CommText,
                Status     = model.Status,
                RowID      = model.RowID,
            };

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