POWER BUIDER VÀ CHƯƠNG TRÌNH TỔNG VỤ potx

34 513 5
POWER BUIDER VÀ CHƯƠNG TRÌNH TỔNG VỤ potx

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

POWER BUIDER VÀ CHƯƠNG TRÌNH TỔNG VỤ (biên soạn Đào Công Thới) PHẦN I: CÁC CÚ PHÁP POWERBUILDER A )Cac kiểu khai báo biến thông dụng Menu im_id //biến kiểu menu menu im_popm //kiểu menu int ii_nowrow //kiểu số nguyên lớn hơn kiểu interger(loại bỏ phần thập phân) vd: - Int(3.2) Int(3.8) trả lại giá trị 3.0 - Int(-3.2) Int(-3.8) trả lại giá trị là -4 datawindow idw_focus //kiểu dayawindow boolean ib_ins, ib_upd //kiểu đúng sai integer lds_ds //kiểu số nguyên ulong AW_HOR_POSITIVE =1 pipelinez guo_pipelinez //kiểu dữ liệu được truyền dẫn string g_transport //kiểu chuổi long ll_newrow //kiểu số dài A.1) khai báo biến kiểu currsor(kiểu con trỏ) -cú pháp: · DECLARE cursor_name CURSOR FOR . . . · OPEN cursor_name · FETCH cursor_name INTO . . . · CLOSE cursor_name -ví dụ:(khi một giá trị biến mang dữ liệu gồm nhiều dòng thì ta dùng cursor) DECLARE emp_curs CURSOR FOR //khai báo biến cursor SELECT emp_name FROM EMPLOYEE WHERE emp_state = :sle_1.text; string emp_name_var OPEN emp_curs; FETCH emp_curs INTO :emp_name_var; // vòng lặp đến khi nào không còn dữ liệu mới ngừng DO WHILE SQLCA.sqlcode = 0 MessageBox("Found an employee!",emp_name_var) FETCH emp_curs INTO :emp_name_var; LOOP CLOSE emp_curs; B) cách thiết lập menu(thong qua ví dụ từ chương trình tổng vụ) -khai báo hai dang menu +dạng menu trên thanh tasbar menu im_id +dang menu popup menu im_popm -thiết lập form sử dụng menu nào(thông qua biến) Trong sự kiện open trên form im_id = this.menuid //sử dụng chính menu trên form này im_popm = create m_sheet //sử dụng menu m_sheet(menu này dạng popup) -đây là cách kiểm tra xem popup khác menu tasbar chổ nào Ví dụ: 1- //biến chỉ đến menu tasbar là im_id //item trước là vị trí menu cha,item sau là vị trí menu con im_id.item[1].item[1].Enabled = TRUE // save im_id.item[1].item[2].Enabled = FALSE // print im_id.item[1].item[5].Enabled = FALSE // query im_id.item[4].item[1].Enabled = FALSE // new im_id.item[4].item[2].Enabled = FALSE // modify im_id.item[4].item[3].Enabled = FALSE // delete im_id.item[4].item[4].Enabled = TRUE // cancel // biến chỉ dến menu popup là im_popm im_popm.item[4].item[1].Enabled = FALSE // new im_popm.item[4].item[2].Enabled = FALSE // modify im_popm.item[4].item[3].Enabled = FALSE // delete im_popm.item[4].item[5].Enabled = FALSE // cancel im_popm.item[4].item[7].Enabled = FALSE // save -ví dụ 2 im_id.item[1].item[1].Enabled = FALSE // save im_id.item[1].item[2].Enabled = FALSE // print im_id.item[1].item[5].Enabled = FALSE // query im_id.item[4].item[1].Enabled = FALSE // new im_id.item[4].item[2].Enabled = FALSE // modify im_id.item[4].item[3].Enabled = FALSE // delete im_id.item[4].item[4].Enabled = FALSE // cancel im_popm.item[4].item[1].Enabled = FALSE // new im_popm.item[4].item[2].Enabled = FALSE // modify im_popm.item[4].item[3].Enabled = FALSE // delete im_popm.item[4].item[5].Enabled = TRUE // cancel im_popm.item[4].item[7].Enabled = TRUE // save sau hai ví dụ ta thấy menu frame sữ dụng cho thanh tasbar ma biến đại diện menu là im_id. Còn menu m_sheet sử dụng cho menu popup biến đại diện là im_popm Và đây là 2 hình của 2 menu này Sau khi xem ví dụ cụ thể trên tôi tin rằng bạn dư sức thiết lập menu cho nó hoạt động như thế nào rồi đó C) các lệnh hoạt động của menu tieu biểu I) Lệnh tạo một dòng dữ liệu mới (ue_newrow, ue_newrow_d) ll_newrow = This.InsertRow(0) cho biến này inser một giá trị rỗng(lệnh inser) (this) mang giá trị của form hay datawindow đang thực thi gọi nó This.ScrollToRow( ll_newrow ) và giá trị rỗng ấy được đặt ở hàng cuối cùng Gia tri (this) bây gio đại diện cho dw ii_nowrow = dw_1.GetRow(): đọc vô hàng hiện tại rồi gán biến ii_nowrow bằng giá trị hàng dữ liệu dw_1.Setfocus() : uu tien cho dw_1(được đặt con trỏ hoặt rê chuột tác động) II) lệnh lưu lại một dòng vừa inser vào áp dụng ví dụ từ chương trình If ii_status=11 or ii_status=12 then //neu chương trình kích hoạt inser or modify thì If dw_1.AcceptText() = 1 then //kiểm tra xem có dòng dữ liệu chưa dw_1.TriggerEvent("ue_save") // sau đó gọi đến sự kiện ue_save để thực hiện lệnh save ue_save long ll_del,ll_mod,ll_total //khai báo biến ll_del = this.DeletedCount() //biến nhận giá trị số dòng bị xóa ll_mod = this.ModifiedCount() //biến nhận giá trị số dòng bị sữa ll_total = ll_del + ll_mod //nếu tổng số dòng thêm mới và số dòng được sữa lớn hơn 0 và lựa chọn update thì lệnh save kích hoạt IF ll_total > 0 AND this.Update(TRUE,FALSE) = 1 THEN commit Using SQLCA; this.ResetUpdate() //lệnh này lưu dòng dữ liệu lại vào cơ sở dữ liệu this.Object.Datawindow.ReadOnly = "YES" ib_save = TRUE //truyền ra ngoài biến ib_save=true ELSE rollback Using SQLCA; //nếu lệnh save không thành công thì trả ra ib_save= faise ib_save = FALSE END IF kết thúc ue_save IF dw_1.ib_save = true THEN this.TriggerEvent ( 'ue_lostctrl_m' )//sau khi lưu lại lập tức set lại menu dw_1.Object.DataWindow.ReadOnly = true ii_status = 0 //trỡ về ban đầu ELSEIF trim(dw_1.GetItemString(dw_1.GetRow(),1)) <> "" THEN IF dw_1.DeletedCount() + dw_1.ModifiedCount() = 0 THEN this.TriggerEvent ( 'ue_lostctrl_m' )//nếu save không thành công lập tức set lại menu dw_1.Object.DataWindow.ReadOnly = true ii_status = 0 //trỡ lại ban đầu dw_1.ib_save = TRUE END IF END IF End if End if //sau khi xem ví dụ này chốt lại lệnh save dữ liệu là this.ResetUpdate() III) lệnh sữa một dòng dữ liệu(ue_modify, ue_modify_d) if dw_1.GetRow() > 0 then // nếu xác định có dòng dữ liệu if Not IsNull(dw_1.GetItemString( dw_1.GetRow(), 1 )) then this.TriggerEvent ( 'ue_control_m' )//menu được set lại dw_1.Object.DataWindow.ReadOnly="No" ii_status = 12 ii_nowrow = dw_1.GetRow() //dòng hiện tại được phép sữa else Messagebox ( "訊訊", "訊訊訊訊訊訊 !!" )// nếu không có dữ liệu để sữa thì thông báo end if else Messagebox ( "訊訊", "訊訊訊訊訊訊 !!" ) // nếu không có dữ liệu để sữa thì thông báo end if //sau đó chỉ cần gọi sự kiện save thì dữ liệu được sữa se lưu lại vào cơ sở dữ liệu -Ví dụ: if idw_focus.GetRow () > 0 then //nếu hàng hiện thời >0 thì this.TriggerEvent ( 'ue_control_d' ) idw_focus.Object.DataWindow.ReadOnly="No" ii_status = 2 idw_focus.Triggerevent('ue_modify_d') ii_nowrow = idw_focus.GetRow()//biến bằng giá trị hiện thời(modify) else Messagebox ( "訊訊", "訊訊訊訊訊訊訊訊 !!" ) end if IV) lệnh xóa một dòng dữ liệu(ue_deleterow, ue_deleterow_d) if dw_1.GetRow() > 0 then if Not IsNull(dw_1.GetItemString( dw_1.GetRow(), 1 )) then if Messagebox ( "訊訊", "訊訊訊訊訊訊訊訊訊 ??", Question!, OkCancel! ) = 2 then Return //hỏi xem có xóa dữ liệu không end if ii_status = 13 dw_1.Triggerevent( 'ue_deleterow' ) //gọi đến sự kiện xóa dòng dw_1.TriggerEvent ( 'ue_save' ) //sau đó lưu lại else Messagebox ( "訊訊", "訊訊訊訊訊訊 !!" ) //nếu không có dữ liệu thì thông báo end if else Messagebox ( "訊訊", "訊訊訊訊訊訊 !!" ) end if ue_daleterow long ll_currentrow ll_currentrow = This.GetRow( ) This.deleterow(ll_currentrow) //xóa dòng dữ liệu ket thúc V) lệnh cancel lệnh vừa kich hoạt ví dụ 1 (ue_cancel) lệnh cancel khi sử dụng menu tasbar if ii_status = 11 then //nếu mà thêm mới thì dw_1.DeleteRow(dw_1.RowCount()) //xóa dòng hiện thời vừa thêm mới IF dw_1.RowCount() < 1 THEN //kiểm tra xem dòng hiện tại nếu chưa có thì dw_1.InsertRow(0) // thể hiện khung datawindow END IF Else // nếu mà sữa dữ liệu thì dw_1.object.data.current[dw_1.getrow()] = dw_1.object.data.original[dw_1.getrow()] dw_1.setitemstatus(dw_1.getrow(),0,primary!,NotModified!) //thiết lập tình trạng không thay đổi dữ liệu ở dw_1 end if ii_status = 0 //trả về như lúc ban đầu dw_1.ScrollToRow(dw_1.RowCount()) // cuộn tới hàng kế tiếp dw_1.Object.DataWindow.ReadOnly="Yes" dw_1.TriggerEvent("ue_cancel") //goi đến ue_cancel this.TriggerEvent ( 'ue_lostctrl_m' ) //set lai memu ue_cancel IF ii_status = 11 THEN this.DeleteRow(this.RowCount()) IF this.RowCount() < 1 THEN this.InsertRow(0) END IF ELSEIF ii_status = 12 THEN //sữa lại một dòng dữ liệu this.Object.Data.Current[this.GetRow()] = this.Object.Data.Original[this.GetRow()] this.SetItemStatus(this.GetRow(),0,Primary!,NotModified!) //set cho tình trạng không thay đổi dữ liệu END IF this.Modify("Datawindow.ReadOnly = YES") ii_status = 0 //trỡ lại tình trạng chưa có sự kiện nào kích hoạt kết thúc ue_cancel Ví dụ 2(ue_cancel_d) lệnh cancel khi sử dụng menu popup if Mod(ii_status, 10) = 1 then //biến ii_status chia cho 10 mà phần dư=1 thì ii_status = 0 //trở lại tình trạng nguyên thủy idw_focus.RowsDiscard ( ii_nowrow, idw_focus.RowCount(), Primary! ) else //nếu sữa dữ liệu idw_focus.object.data.current[idw_focus.getrow()] =idw_focus.object.data.original[idw_focus.getrow()] idw_focus.setitemstatus(idw_focus.getrow(),0,primary!,NotModified!) end if ii_status = 0 idw_focus.Object.DataWindow.ReadOnly="Yes" this.TriggerEvent ( 'ue_lostctrl_d' ) //set lai menu (vậy sau khi xét ví dụ trên ta thấy lệnh cancel là lệnh quay lại ban đầu và không thực hiện lệnh Thay đổi dữ liệu) VI ) các lệnh di chuyển trên dữ liệu( tới,lui,đầu,cuối) 1 ) ue_nexrow(tới dòng kế tiếp) integer li_count,li_currow li_count = This.RowCount() li_currow = This.getrow() if li_currow = li_count then IF IsValid(m_frame) THEN m_frame.m_edit.m_lastrow.Enabled = FALSE m_frame.m_edit.m_nextrow.Enabled = FALSE m_frame.m_edit.m_firstrow.Enabled = TRUE m_frame.m_edit.m_priorrow.Enabled = TRUE END IF else This.ScrollNextRow( ) // chạy đến dòng kế tiếp IF IsValid(m_frame) THEN m_frame.m_edit.m_firstrow.Enabled = TRUE m_frame.m_edit.m_priorrow.Enabled = TRUE END IF end if setfocus(This) 2) ue_lastrow(trở về dòng trước) integer li_rowcount li_rowcount = This.RowCount() This.ScrollToRow(li_rowcount) //trở về hàng trước setfocus(This) IF IsValid(m_frame) THEN m_frame.m_edit.m_lastrow.Enabled = FALSE m_frame.m_edit.m_nextrow.Enabled = FALSE m_frame.m_edit.m_firstrow.Enabled = TRUE m_frame.m_edit.m_priorrow.Enabled = TRUE END IF 3 ) ue_firstrow(về dòng đầu tiên) This.ScrollToRow(0) //về dòng đầu tiên setfocus(This) IF IsValid(m_frame) THEN m_frame.m_edit.m_firstrow.Enabled = FALSE m_frame.m_edit.m_priorrow.Enabled = FALSE m_frame.m_edit.m_lastrow.Enabled = TRUE m_frame.m_edit.m_nextrow.Enabled = TRUE END IF 4) ue_priorrow (về dòng cuối cùng) integer li_count,li_currow li_currow = This.getrow() if li_currow = 1 then IF IsValid(m_frame) THEN m_frame.m_edit.m_firstrow.Enabled = FALSE m_frame.m_edit.m_priorrow.Enabled = FALSE m_frame.m_edit.m_lastrow.Enabled = TRUE m_frame.m_edit.m_nextrow.Enabled = TRUE END IF else This.ScrollPriorRow() //về dòng cuối cùng IF IsValid(m_frame) THEN m_frame.m_edit.m_lastrow.Enabled = TRUE m_frame.m_edit.m_nextrow.Enabled = TRUE END IF end if setfocus(This) VII ) các lệnh di chuyển trên trang báo biểu 1 ) ue_nextpage This.scrollnextpage() //lệnh di chuyển đến trang kế tiếp 2) ue_priorpage This.scrollpriorpage() //di chuyển đến trang cuối cùng D ) các giá trị biến được gán với sự kiện ii_status = 11: sự kiện ue_newrow(thêm mới một dòng dữ liệu) ii_status = 0: chưa có sự kiện nào kích hoạt ii_status = 12: sự kiện ue_modify(sữa chữa lại một dòng cũ) ii_status = 22: sự kiện ue_modify_d (sữa chữa trên dòng dữ liệu) ii_status = 13: sự kiện ue_deleterow ii_status = 23: sự kiện ue_deleterow_d(xóa trên dòng dữ liệu) ii_startus=1 : sự kiện ue_newrow ii_status=21 : sự kiện thêm mới * dw_1.SetTransObject ( SQLCA ) //cho phép thể hiện dw_1 * dw_1.Object.DataWindow.ReadOnly="No" //datawindow này được phép thêm xóa hoặc sữa * dw_1.Object.DataWindow.ReadOnly="yes” // datawindow này chỉ đọc không làm gì hết Tương tự: * dw_1.Object.DataWindow.ReadOnly=false //.datawindow này được phép thêm xóa hoặc sữa * dw_1.Object.DataWindow.ReadOnly= true //datawindow này chỉ đọc không làm gì hết E) truyền giá trị từ cột,giá trị đệm vào biến 1) getitem -diễn giải Truyền dữ liệu từ cột và hàng xác dịnh vào biến,hoac giá trị lưu trữ ở bộ đệm vào biến -cú pháp returnvalue dwcontrol.GetItem (number row, number column ) returnvalue dwcontrol.GetItem (number row, string column ) -ví dụ var LName = dw_employee.GetItem(3, "emp_name"); đặt giá trị cột emp_name hàng số 3 vào biến lname có kiểu var 2)getitemdate - diễn giải: Lấy giá trị có sẵn ở cột và hàng xác định,hoặc từ bộ đệm(kiểu ngày đưa vào biến) -cú pháp date dwcontrol.GetItemDate ( long row, string column {, DWBuffer dwbuffer , boolean originalvalue } ) date dwcontrol.GetItemDate ( long row, integer column {, DWBuffer dwbuffer, boolean originalvalue } ) -ví dụ Date hiredate hiredate = dw_employee.GetItemDate(3, "first_day") //lấy giá trị kiểu ngày từ cột first_date hàng số 3 vào biến hiredate 3)getitemnumber -diễn giải Lấy giá trị kiểu số từ cột và hàng xác định,hoặt từ bộ đệm đưa vào biến -Cú pháp numeric dwcontrol.GetItemNumber( long row, string column{, DWBuffer dwbuffer, boolean originalvalue } ) numeric dwcontrol.GetItemNumber( long row, integer column{,DWBuffer dwbuffer, boolean originalvalue } ) -ví dụ: integer EmpNbr EmpNbr = dw_employee.GetItemNumber(4, "emp_nbr") // lấy giá trị kiểu số từ hàng 4 cột emp_npr đưa vào biến EmpNprte 4)Getitemstring -Ví dụ thực tế ls_kind = this.getitemstring(row,’as_kind’): //truyền dữ liệu as_kind vào biến ls_kind ls_pnl_no = dw_1.getitemstring(dw_1.getrow(),’pnl_no’): // truyền dữ liệu từ cột pnl_no vào biến ls_pnl_no cú pháp: string dwcontrol.GetItemString (number row, number column {, string dwbuffer, boolean originalvalue } ) ví dụ: String LName LName = dw_employee.GetItemString(3, "emp_name") //Biến LName nhận giá trị hàng 3 trong cột có tên emp_name trong DataWindow dw_employee 5)getitemtime -Ví dụ: Time Start Start = dw_employee.GetItemTime(3, "title") -diễn giải Dữ liệu hàng 3 cột title được chuyển vào biến start dưới dạng giờ F )truyền giá trị từ biến vào cột 1) setitem -diễn giải Truyền một giá trị biến vào cột và hàng xác định -cú pháp integer dwcontrol.SetItem ( long row, integer column, any value ) -ví dụ dw_order.SetItem(3, "hire_date", 2003-06-07) -giải thích ví dụ Gán giá tri là ‘2003-06-07 ‘vào cột hire_date dòng 3 của dw_oder 2) setitemdate - diễn giải: Truyền một giá trị ngày tháng vào cột và hàng xác định -cú pháp: number dwcontrol.SetItemDate ( number row, string column, Date value ) number dwcontrol.SetItemDate ( number row, number column, Date value ) 3)setitemdatetime -cú pháp: number dwcontrol.SetItemDateTime ( number row, string column, Date value ) number dwcontrol.SetItemDateTime ( number row, number column, Date value ) 4)setitemnumber -diễn giải: truyền giá trị số vào hàng cột xác định -cú pháp: short dwcontrol.SetItemNumber ( long row, string column, double value ) short dwcontrol.SetItemNumberByColNum ( long row, short column,double value ) 5)setitemstatus(thiết lập tình trạng cho ô dữ liệu) -diễn giải: Ô dữ liệu sẽ được thiết lập một tình trạng,ví như không được sữa -cú pháp: integer dwcontrol.SetItemStatus ( long row, integer column, dwbuffer dwbuffer, dwitemstatus status ) integer dwcontrol.SetItemStatus ( long row, string column, dwbuffer dwbuffer, dwitemstatus status ) +giải thích riêng về dwbutfer [...]... 18) mảng và object LONG ll_row1 FOR ll_row1 = 1 TO DW_5.ROWCOUNT() ls_stkno1 = DW_5.object.stk_no[ll_row1] ls_food_no = DW_5.object.food_daily_listd_food_no[ll_row1] ls_mat_no = DW_5.object.food_ref_mat_mat_no[ll_row1] ld_std_qty = DW_5.object.food_ref_mat_std_per_qty[ll_row1] ls_diningroom = DW_5.object.food_daily_listm_diningroom[ll_row1] PHẦN III ) PHÂN TÍCH ỨNG DỤNG TRONG CHƯƠNG TRÌNH TỔNG VỤ Function_application... FileReadEx reads the file line by line and no other user is able to access the file until it is closed: Tạm dịch: Ví dụ này sử dụng những mặt định của chương trình khi mở file emloyee.dat để đọc Mặt định là LineMode!, read!, LockReadWrite!, và EncodingANSI!. ,và đọc cho đến khi đóng lại integer li_FileNum li_FileNum = FileOpen("EMPLOYEE.DAT") ví dụ 2: This example opens the file EMPLOYEE.DAT in the DEPT... lưu file vào đường đó Chức năng lưu file vào đường dẫn Ví dụ 1: string ls_path, ls_file int li_rc ls_path = sle_1.Text li_rc = GetFileSaveName ( "Select File", & ls_path, ls_file, "DOC", & "All Files (*.*),*.*" , "C:\My Documents", & 32770) IF li_rc = 1 Then sle_1.Text = ls_path End If //mở ra hộp thoại để lựa chọn đường dẫn,mặt định là file doc và file mặt định la thư mục c:\my ducument ,và phần mở... 5)mệnh đề select và select into (truy xuất dữ liệu) Ví dụ 1: //truyền dữ liệu từ cột vào biến SELECT emp_name, emp_salary INTO :emp_name_var, :emp_salary_var //truyền dữ liệu vào biến FROM employee WHERE emp_id = :emp_id_var; // truy xuất dữ liệu của hai cột SELECT emp_name, emp_salary FROM employee WHERE emp_id = 691; Chú ý: nếu dữ liệu trong bảng lớn hơn hai dòng thì nên đưa câu lệnh select vào biến cursor... ký tự vào dòng và cột xác định -ví dụ: this.setitem(this.getrow(),’matm_mat_no’,bien): lấy dữ liệu của biến vào cột(mat_no của bảng matm) -lấy dữ liệu từ file đuôi ini *cú pháp: ProfileString ( filename, section, key, default ) Ví dụ thực tế: ls_password = ProfileString (is_ini_file, "database", "LogPassword", ví dụ: ProfileString("C:\PROFILE.INI", "Employee", "Name", "None") -chuyển dữ liệu vào file... phần hình dư END IF ELSE ll_loop = 1//nếu hình nhỏ hơn 32765 byte thì không phải chia hình ra END IF FOR ll_count = 1 to ll_loop//bắt đầu lặp và đưa hình vào biến bằng lệnh fileread ll_read = FileRead(li_FileNum, lb_get)//lb_get là biến nhận hình khi truyền vào lb_tot = lb_tot + lb_get //nếu hình bị chia nhỏ ra thì bây giờ gộp lai thành lb_tot NEXT FileClose(li_FileNum) //sau khi lấy xong thì đóng... DW_5.object.food_daily_listm_diningroom[ll_row1] PHẦN III ) PHÂN TÍCH ỨNG DỤNG TRONG CHƯƠNG TRÌNH TỔNG VỤ Function_application >> w_connect ( >wf_connect) >> w_login //Quy trình kết nối dữ liệu va dẫn đến form đầu tiên của chương trình application app //khai báo biến chung app = GetApplication( ) IF ab_application = TRUE THEN app.MicroHelpDefault ='訊訊 ' app.ToolbarText = TRUE app.ToolbarUserControl... = rgb(255,0,0) mle_2.text = '訊訊訊訊訊訊訊訊訊!' messagebox(string(sqlca.sqlcode),sqlca.sqlerrtext) mle_2.textcolor = rgb(0,255,0) il_time = 1 else close(w_connect) open(w_login) //vào form login end if IV)PHÂN TÍCH ỨNG DỤNG TRONG CHƯƠNG TRÌNH TÀI SẢN CỐ ĐỊNH ... cursor Sau dó mới fetch từng dòng dữ liệu vào thông qua vòng lặp Ví dụ 2: // kiểm tra nếu có giá trị thì if sle_Emp.text "" then DELETE FROM employee WHERE emp_id = :sle_Emp.text; // điều kiện xóa if SQLCA.sqlcode = 0 then // kiểm tra nếu đã xóa thì xuất hiện hộp thông báo MessageBox( "Delete","The delete has been successfully "+" processed!") COMMIT; // cập nhật vào cơ sở dữ liệu else MessageBox( "Error",... Lớn hơn hoặc bằng nhau Nhỏ hơn hoặc bằng nhau Không bằng Giống IN BETWEEN Nằm trong giá trị Nằm trong khoản giá trị cả giá trị đầu và giá trị cuối Không giống mẫu xác định NOT LIKE NOT IN NOT BETWEEN Không nằm trong giá trị không nằm trong khoản xác định cả giá trị đầu và giá trị cuối 20) hàm today (lấy ngày giờ hệ thống) Cú pháp: Today ( ) Ví dụ: //Lấy ngày tháng hiện tại của hệ thống Ví dụ Price . POWER BUIDER VÀ CHƯƠNG TRÌNH TỔNG VỤ (biên soạn Đào Công Thới) PHẦN I: CÁC CÚ PHÁP POWERBUILDER A )Cac kiểu khai báo biến thông dụng Menu. chuột tác động) II) lệnh lưu lại một dòng vừa inser vào áp dụng ví dụ từ chương trình If ii_status=11 or ii_status=12 then //neu chương trình kích hoạt inser or modify thì If dw_1.AcceptText(). emp_curs INTO :emp_name_var; LOOP CLOSE emp_curs; B) cách thiết lập menu(thong qua ví dụ từ chương trình tổng vụ) -khai báo hai dang menu +dạng menu trên thanh tasbar menu im_id +dang menu popup menu

Ngày đăng: 02/08/2014, 02:21

Tài liệu cùng người dùng

Tài liệu liên quan