public Bill GetManaged() { var bill = BillBusiness.Get(Id); if (bill == null) { throw new Exception("Mã hóa đơn không tồn tại"); } return(bill); }
public void Query_Receipt() { Database.WriteAsync(realm => realm.Add(new Receipt { Id = 10, Money = 1, BankAccountNumber = "11111", Bill = BillBusiness.Get(1), Employee = EmployeeBusiness.Get(Constant.adminName) })).Wait(); SchemaHelper.Execute( @"/_GraphQL/Receipt/query.receipt.gql", @"/_GraphQL/Receipt/query.receipt.schema.json", new { id = 10 }, p => p.PermissionGetAccountingVoucher = true ); }
public BillQuery() { Field <NonNullGraphType <ListGraphType <NonNullGraphType <BillType> > > >( _List, "Trả về một danh sách các hóa đơn", resolve: _CheckPermission_List( p => p.PermissionGetAccountingVoucher, context => BillBusiness.Get() ) ); Field <NonNullGraphType <BillType> >( _Item, "Trả về thông tin một hóa đơn", _IdArgument(), _CheckPermission_Object( p => p.PermissionGetAccountingVoucher, context => BillBusiness.Get(_GetId <int>(context)) ) ); }