protected void Page_Load(object sender, EventArgs e) { if (BP.Web.WebUser.No == null) { this.Response.Redirect("Login.aspx", true); return; } if (this.IsPostBack == false) { //是否有传值 if (this.Request.QueryString.Count > 1) { string paras = ""; foreach (string str in this.Request.QueryString) { string val = this.Request.QueryString[str]; if (val.IndexOf('@') != -1) { throw new Exception("您没有能参数: [ " + str + " ," + val + " ] 给值 ,URL 将不能被执行。"); } switch (str) { case DoWhatList.DoNode: case DoWhatList.Emps: case DoWhatList.EmpWorks: case DoWhatList.FlowSearch: case DoWhatList.Login: case DoWhatList.MyFlow: case DoWhatList.MyWork: case DoWhatList.Start: case DoWhatList.Start5: case DoWhatList.FlowFX: case DoWhatList.DealWork: case "FK_Flow": case "WorkID": case "FK_Node": case "SID": break; default: paras += "&" + str + "=" + val; break; } } //mainSrc = "/WF/MyFlow.aspx?FK_Flow=" + this.FK_Flow + paras + "&FK_Node=" + FK_Node; BP.Demo.BPFramework.Student stu = new BP.Demo.BPFramework.Student(); stu.No = "0001"; stu.RetrieveFromDBSources(); BP.WF.Dev2InterfaceGuest.Port_Login(stu.No, stu.Name); string s = "../../WF/MyFlow.aspx?FK_Flow=" + this.FK_Flow + paras + "&FK_Node=" + FK_Node + "&GuestNo=" + GuestUser.No + "&GuestName=" + GuestUser.Name; this.Response.Write("<script type='text/javascript' language='javascript'> window.open('" + s + "');</script>"); } } }
protected void Page_Load(object sender, EventArgs e) { BP.Demo.BPFramework.Student st = new BP.Demo.BPFramework.Student(); st.No = "sssss"; st.Name = "xcxcvasd"; st.Insert(); Student en = new Student("sssss"); }
/// <summary> /// 展示EnttiyNo自动编号 /// </summary> public void EnttiyNo() { // 创建一个空的实体. BP.Demo.BPFramework.Student en = new BP.Demo.BPFramework.Student(); // 给各个属性赋值,但是不要给编号赋值. en.Name = "张三"; en.FK_BanJi = "001"; en.Age = 19; en.XB = 1; en.Tel = "0531-82374939"; en.Addr = "山东.济南.高新区"; en.Insert(); //这里会自动给该学生编号,从0001开始,编号规则打开该类的Map. string xuehao = en.No; this.Response.Write("信息已经加入,该学生的学好为:" + xuehao); //查询出来该实体。 BP.Demo.BPFramework.Student myen = new BP.Demo.BPFramework.Student(xuehao); this.Response.Write("学生姓名:" + myen.Name); this.Response.Write("地址:" + myen.Addr); }