On 2/15/2010 3:08 PM, Jacek Kałucki wrote:
> Użytkownik sim napisał:
>   
>> The table has a single primary key, customerid.
>> My bizobj is about as simple as you could get:
>>
>> import dabo
>>
>> class CustomerBizobj(dabo.biz.dBizobj):
>>          def afterInit(self):
>>                  self.DataSource = "customers"
>>                  self.KeyField = "customerid"
>>
>>    
>>     
> To be clear, you have two forms, first selection form,
> and second edit form, where edit form derives bizobj from
> selection form. I'm correct right?
>   
Edit form and grid form each use their own instance of the same bizobj.

The first form is a grid with the customer list.
When I double click on a customer it opens the details form for that
customer.
This works by calling
This part works by:
                bizobj = self.Form.getBizobj(self.DataSource)
                customerid= bizobj.getPK()
                cust=CustomerDetails_ui(self)
                biz2=cust.getBizobj("customer")
                cust.requery()
                biz2.moveToPK(customerid)
                cust.show()

I now created a New Customer button that uses:
                cust=CustomerDetails_ui(self)
                cust.requery()
                cust.new()
                cust.show()

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to