TAILIEUCHUNG - Apress introducing ASP.Net 4.0 with visual studio 2010_5

Tham khảo tài liệu 'apress introducing with visual studio 2010_5', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | CHAPTER 6 WINDOWS WORKFLOW FOUNDATION 4 Figure 6-13. New flowchart workflow 3. The design view for flowcharts looks slightly different than sequential workflows. The green circle indicates where the workflow starts. We need to create a new activity to read input from the user. Create a new class called Readinput. 4. Enter the following using statement using 5. Now enter the following code public class Readinput CodeActivity int32 protected override Int32 Execute CodeActivityContext context . . return 6. Save the class and compile the application. 7. Open . 8. Drag a WriteLine activity beneath the green circle and change the Display Name to What is your age and set the Text to What is your age 147 CHAPTER 6 WINDOWS WORKFLOW FOUNDATION 4 9. Drag the new Readinput activity beneath the What is your age activity and change the display name to Read input. 10. Create a new variable called age of type Int32. 11. On the Readinput activity set the Result property to age. The next thing to do is determine if the customer is old enough to see the film which in this case will always have an 18 rating . Flow chart workflows have a new type of activity not found in sequential workflows called FlowDecision. 1. Drag a FlowDecision activity beneath the read input block and change the condition to Age 18. There are obviously two possibilities to this expression Customer is old enough so they can see the film FlowDecision condition true . Customer is too young so shouldn t be seeing any movies FlowDecision condition false . 2. To simulate the customer failing age verification drag a WriteLine activity to the right of the flow decision and change the display name and text to Sorry not old enough. 3. Drag another WriteLine activity beneath the flow decision and change the display name and text to Age validation successful. 4. We now need to link up the activities we have just created. Move the mouse over the green circle .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.