Esempio n. 1
0
        public async Task <ActionResult <PuSupplierDto> > PuSupplierById(int id)
        {
            MessageModel <PuSupplierDto> res = new MessageModel <PuSupplierDto>();
            PuSupplier pusupplier            = await _pusupplierservices.GetEntityByIdAsync(id);

            res.Data = _mapper.Map <PuSupplierDto>(pusupplier);
            return(Ok(res));
        }
        public async Task <int> EditPS(PuSupplier table)
        {
            var supplier = await _IPuSupplierService.FindAsyncById(table.Id);

            supplier.Address  = table.Address;
            supplier.Credit   = table.Credit;
            supplier.Email    = table.Email;
            supplier.Linkman  = table.Linkman;
            supplier.Name     = table.Name;
            supplier.Postcode = table.Postcode;
            supplier.Qq       = table.Qq;
            supplier.Remark   = table.Remark;
            supplier.Tel      = table.Tel;
            supplier.Weixin   = table.Weixin;
            return(await _IPuSupplierService.Edit(supplier));
        }
 public async Task <int> AddPS(PuSupplier table)
 {
     var supplier = await _IPuSupplierService.FindAsyncById(table.Id);