Exemplo n.º 1
0
        public LogicResult addProduct(FormAddProductObj frmObj)
        {
            SanPhamDao dao = new SanPhamDao();

            if (frmObj.idSanPhamCha == 0)
            {
                SanPhamDto sanPhamdto = new SanPhamDto();
                sanPhamdto.nameSanPhamCha = frmObj.tenSanPhamCha;

                frmObj.idSanPhamCha = dao.insertSanPham(sanPhamdto);
            }
            dao.insertSanPhamChiTiet(createSanPhamChiTietDto(frmObj));
            return(new LogicResult(Contanst.MSG_INFO, AppUtils.getAppConfig("MSGINFO003"), null));
        }