public async Task <IActionResult> AddStockDetailByMaterialNo(SF428SampleNoDetail sF428SampleNoDetail)
        {
            SamPartB model = await _samPartBDAO.FindAll(x => x.SAMPLENO.Trim() == sF428SampleNoDetail.SampleNo.Trim() &&
                                                        x.MATERIANO == sF428SampleNoDetail.MaterialNo.Trim()).FirstOrDefaultAsync();

            if (model != null)
            {
                model.STATUS     = sF428SampleNoDetail.Status;
                model.CHKSTOCKNO = sF428SampleNoDetail.ChkStockNo;
                model.CHKUSR     = sF428SampleNoDetail.loginUser;
                model.CHKTIME    = DateTime.Now;
                _samPartBDAO.Update(model);
            }
            await _samPartBDAO.SaveAll();

            return(Ok());
        }
Beispiel #2
0
        public async Task <IActionResult> AddStockDetailByMaterialNo(SF428SampleNoDetail sF428SampleNoDetail)
        {
            _logger.LogInformation(String.Format(@"****** WareHouseController AddStockDetailByMaterialNo fired!! ******"));

            SamPartB model = await _samPartBDAO.FindAll(x => x.SAMPLENO.Trim() == sF428SampleNoDetail.SampleNo.Trim() &&
                                                        x.MATERIANO == sF428SampleNoDetail.MaterialNo.Trim()).FirstOrDefaultAsync();

            if (model != null)
            {
                model.STATUS     = sF428SampleNoDetail.Status;
                model.CHKSTOCKNO = sF428SampleNoDetail.ChkStockNo;
                model.CHKUSR     = sF428SampleNoDetail.loginUser;
                model.CHKTIME    = DateTime.Now;
                _samPartBDAO.Update(model);
            }
            await _samPartBDAO.SaveAll();

            return(Ok());
        }