Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //设置读取设备类型
                DevTypeBLL   bll   = new DevTypeBLL();
                DevTypeModel model = bll.GetTypeByCode("peidian");
                this.hidden_Attribute.Value = model.dtID.ToString();

                //string pageurls = Request.Params["pageUrls"];
                //if (!string.IsNullOrEmpty(pageurls))
                //{
                //    foreach (var item in pageurls.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries))
                //    {
                //        if (item.Contains("cshyT101.aspx"))
                //        {
                //            urls.AppendFormat("<option selected value='" + item + "'>" + item.Substring(item.LastIndexOf('/') + 1, item.LastIndexOf('.') - item.LastIndexOf('/') - 1) + "</option>");
                //        }
                //        else
                //        {
                //            urls.AppendFormat("<option value='" + item + "'>" + item.Substring(item.LastIndexOf('/') + 1, item.LastIndexOf('.') - item.LastIndexOf('/') - 1) + "</option>");
                //        }

                //    }
                //}
            }
        }
Ejemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DevTypeBLL   bll   = new DevTypeBLL();
         DevTypeModel model = bll.GetTypeByCode("paishui");
         this.hidden_Attribute.Value = model.dtID.ToString();
     }
 }
Ejemplo n.º 3
0
        public DevTypeModel GetTypeByCode(string TypeCode)
        {
            List <DevTypeModel> list  = devtype_dal.GetTypeByCode(TypeCode);
            DevTypeModel        model = new DevTypeModel();

            if (list.Count > 0)
            {
                model = list[0];
            }
            return(model);
        }