/// <summary> /// 顯示病歷 /// </summary> protected void show_image() { string sql = "SELECT b.filename FROM pat_info a LEFT JOIN zinfo_g_02 b ON a.pif_ic=b.pat_ic WHERE a.pif_id='" + _PAT_ID + "'"; DataTable dt = db.Query(sql); for (int i = 0; i < dt.Rows.Count; i++) { Ext.Net.Image image = new Ext.Net.Image(); image.ID = "Image" + i + ""; image.ImageUrl = "../upload/" + dt.Rows[i]["filename"] + ""; this.Panel1.Controls.Add(image); } }
private Ext.Net.Image __BuildControlimgVerify() { Ext.Net.Image image = new Ext.Net.Image(); imgVerify = image; image.ApplyStyleSheetSkin(this); image.ColSpan = (1); image.Width = new Unit(150.0, UnitType.Pixel); image.ID = "imgVerify"; image.ImageUrl = ("login.aspx?action=verifyImage"); image.MaxWidth = (100); image.MaxHeight = (0x16); object[] parameters = new object[5]; parameters[0] = image; parameters[2] = 0x4eb; parameters[3] = 0xae; parameters[4] = false; this.__PageInspector_SetTraceData(parameters); return(image); }
private void __BuildControl__control16(ItemsCollection <AbstractComponent> __ctrl) { TextField field = this.__BuildControltxtUsername(); __ctrl.Add(field); TextField field2 = this.__BuildControltxtPassword(); __ctrl.Add(field2); TextField field3 = this.__BuildControltxtVerifyCode(); __ctrl.Add(field3); Ext.Net.Image image = this.__BuildControlimgVerify(); __ctrl.Add(image); DisplayField field4 = this.__BuildControl__control17(); __ctrl.Add(field4); Ext.Net.LinkButton button = this.__BuildControlbtnChangeImage(); __ctrl.Add(button); }
public void ChangeVerifyImage(Ext.Net.Image imgVerify) { string imageUrl = imgVerify.ImageUrl; imgVerify.ImageUrl = base.Request.Url.LocalPath + "?action=verifyImage&" + DateTime.Now.Ticks.ToString(); }
protected override void OnPreInit(EventArgs e) { base.OnPreInit(e); foreach (Control control in Controls) { if (loginForm == null) { loginForm = control as HtmlForm; if (loginForm != null) { break; } } } if (loginForm == null) { throw new ArgumentException("登录页面中至少添加一个服务器端表单"); } window = new Window(); window.Title = "用户登录"; window.Closable = false; window.Icon = Icon.Key; window.Width = 320; window.Height = 185; formPanel = new FormPanel(); formPanel.BodyStyle = "padding:20px;"; formPanel.Layout = "table"; formPanel.LayoutConfig.Add(new TableLayoutConfig() { Columns = 2 }); formPanel.Items.Add(new TextField() { FieldLabel = "用户名", AllowBlank = false, ColSpan = 2, Name = "Username" }); formPanel.Items.Add(new TextField() { FieldLabel = "密码", AllowBlank = false, ColSpan = 2, InputType = Ext.Net.InputType.Password, Name = "Password" }); formPanel.Items.Add(new TextField() { FieldLabel = "验证码", AllowBlank = false, ColSpan = 1, InputType = Ext.Net.InputType.Text, Name = "VerifyCode" }); imgVerify = new Ext.Net.Image() { Width = 100, ImageUrl = "login.aspx?action=VerifyImage", Height = 22, ColSpan = 1, ID = "imgVerify" }; formPanel.Items.Add(imgVerify); window.Items.Add(formPanel); loginForm.Controls.Add(window); btnChangeImage = new Ext.Net.Button(); btnChangeImage.Text = "更换验证码"; btnChangeImage.OnClientClick = "App.direct.ChangeImage();"; window.Buttons.Add(btnChangeImage); btnLogin = new KeyGoButton(); btnLogin.Text = "登录"; btnLogin.ID = "btnLogin"; btnLogin.OnClientClick = "App.direct.Login();"; window.Buttons.Add(btnLogin); }
private Ext.Net.Image __BuildControlimgVerify() { Ext.Net.Image image = new Ext.Net.Image(); imgVerify = image; image.ApplyStyleSheetSkin(this); image.ColSpan=(1); image.Width = new Unit(150.0, UnitType.Pixel); image.ID = "imgVerify"; image.ImageUrl=("login.aspx?action=verifyImage"); image.MaxWidth=(100); image.MaxHeight=(0x16); object[] parameters = new object[5]; parameters[0] = image; parameters[2] = 0x4eb; parameters[3] = 0xae; parameters[4] = false; this.__PageInspector_SetTraceData(parameters); return image; }
protected override void OnPreInit(EventArgs e) { base.OnPreInit(e); foreach (Control control in Controls) { if (loginForm == null) { loginForm = control as HtmlForm; if (loginForm != null) break; } } if (loginForm == null) { throw new ArgumentException("登录页面中至少添加一个服务器端表单"); } window = new Window(); window.Title = "用户登录"; window.Closable = false; window.Icon = Icon.Key; window.Width = 320; window.Height = 185; formPanel = new FormPanel(); formPanel.BodyStyle = "padding:20px;"; formPanel.Layout = "table"; formPanel.LayoutConfig.Add(new TableLayoutConfig() { Columns = 2 }); formPanel.Items.Add(new TextField() { FieldLabel = "用户名", AllowBlank = false, ColSpan = 2, Name = "Username" }); formPanel.Items.Add(new TextField() { FieldLabel = "密码", AllowBlank = false, ColSpan = 2, InputType = Ext.Net.InputType.Password, Name = "Password" }); formPanel.Items.Add(new TextField() { FieldLabel = "验证码", AllowBlank = false, ColSpan = 1, InputType = Ext.Net.InputType.Text, Name = "VerifyCode" }); imgVerify = new Ext.Net.Image() { Width = 100, ImageUrl = "login.aspx?action=VerifyImage", Height = 22, ColSpan = 1, ID = "imgVerify" }; formPanel.Items.Add(imgVerify); window.Items.Add(formPanel); loginForm.Controls.Add(window); btnChangeImage = new Ext.Net.Button(); btnChangeImage.Text = "更换验证码"; btnChangeImage.OnClientClick = "App.direct.ChangeImage();"; window.Buttons.Add(btnChangeImage); btnLogin = new KeyGoButton(); btnLogin.Text = "登录"; btnLogin.ID = "btnLogin"; btnLogin.OnClientClick = "App.direct.Login();"; window.Buttons.Add(btnLogin); }