>>SET DELETED ON >> >>PUBLIC this_user, this_cate >>STORE 0 TO this_user, this_cate >>thisform.cates="" >>this_user=1 >>>>
>>thisform.grid1.recordsource="" >>thisform.cates=int(val(thisform.combo1.value)) >> >>select stock >>locate for usno=m.this_user and cate=thisform.cates and usno>0 and nos>0 >> >>if not found() >> append blank >> replace usno with m.this_user >> replace cate with thisform.cates >> replace nos with 1 >>endif >> >>set filter to usno=m.this_user and cate=thisform.cates and usno>0 and nos>0 >>locate >> >>thisform.grid1.recordsource="stock" >>thisform.grid1.column1.controlsource="stock.pno" >>thisform.grid1.column2.controlsource="stock.nos" >> >>*thisform.grid1.refresh >> >>thisform.fill_grid() >>>>
>>SELECT stock >>replace cate WITH thisform.cates >>replace usno WITH m.this_user >> >> >>If This.RowColChange = 1 >> If stock.nos=0 >> This.AllowAddNew = .F. >> Else >> This.AllowAddNew = .T. >> Endif >>Endif >> >>*thisform.grid1.Refresh >> >>thisform.fill_grid() >>>>
>>replace cate WITH thisform.cates >>>>