private void frm_CopyImge_Load(object sender, EventArgs e) { btn_Save.Enabled = false; this.Width = 200; BLL_SysCode scbll = new BLL_SysCode(); List <sys_code> listAlarmType = scbll.Get_AlarmTypeList(); this.SuspendLayout(); //挂起逻辑布局 const int FirstTop = 35; //初始高度 int offset_top = FirstTop; int offset_left = 10; for (int i = 0, index = 0; i < listAlarmType.Count; i++, index++) { if (index > 9)//一列显示10个 { index = 0; offset_left += 160; offset_top = FirstTop; this.Width += 160; } CheckEdit cb = new CheckEdit(); cb.Properties.AutoWidth = true; cb.Name = "chk_" + listAlarmType[i].Code_ID.ToString(); cb.AutoSize = true; cb.Location = new Point(offset_left, offset_top); cb.Size = new Size(95, 16); if (listAlarmType[i].Remark == "unchosen") { cb.Checked = false; } else { cb.Checked = true; } cb.Text = listAlarmType[i].Meaning; cb.Tag = listAlarmType[i]; cb.CheckedChanged += Cb_CheckedChanged; this.Controls.Add(cb); offset_top += 30; //面板随着内容自动增长 if (offset_top > this.Height) { this.Height = offset_top + FirstTop; } } this.ResumeLayout();//恢复逻辑布局 }
private void Cb_CheckedChanged(object sender, EventArgs e) { CheckEdit thisone = (CheckEdit)sender; sys_code thiscode = (sys_code)thisone.Tag; BLL_SysCode scbll = new BLL_SysCode(); if (thisone.Checked) { thiscode.Remark = ""; } else { thiscode.Remark = "unchosen"; } scbll.Set_SysCodeRemark(thiscode); }
protected void Page_Load(object sender, EventArgs e) { Module_Id = "30203000"; SetSearchP(); ReturnUrl = strPageName + "?" + Rc.Cloud.Web.Common.pfunction.getPageParam(); //得到用户在此页面的权限 //UserFun = new BLL_clsAuth().GetUserFunc(loginUser.DoctorInfo_ID, PHHC.Share.StrUtility.clsUtility.ReDoStr(loginUser.SysRole_IDs, ','), Module_Id); if (!IsPostBack) { DataTable dt = new DataTable(); dt = new BLL_SysCode().GetSysName().Tables[0]; if (dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { ddlSysCode.Items.Add(new ListItem(dt.Rows[i]["SysName"].ToString(), dt.Rows[i]["SysCode"].ToString())); } } SetSearchO(); } }
protected void Page_Load(object sender, EventArgs e) { if (!string.IsNullOrEmpty(Request["moduleID"])) { module_ID = Request["moduleID"].ToString().Trim(); } if (!string.IsNullOrEmpty(Request["action"])) { actionType = Request["action"].ToString().Trim(); } if (!string.IsNullOrEmpty(Request["sysCode"])) { sysCode = Request["sysCode"].ToString().Trim(); } if (!IsPostBack) { DataTable dt = new BLL_SysCode().GetSysName().Tables[0]; Rc.Cloud.Web.Common.pfunction.SetDdl(ddlSysCode, dt, "SysName", "SysCode", ""); if (module_ID != null && module_ID != "" && sysCode != null && sysCode != "") { BindData(module_ID, sysCode); } } }