private void InitData()
        {
            JBind.BindList(dropTypeId, JTree.GetClassTree(bll_dic.GetListByParent(1), "ParentId", "1", "DictionaryName"));

            if (Id > 0)
            {
                //edit
                model = bll.GetModel(Id.ToString());
                if (model != null)
                {
                    txtAddress.Text          = model.EvalAble;
                    imgPhoto.ImageUrl        = model.ImagePath;
                    chkIsTop.Checked         = model.IsTop > 0;
                    chkIsRecommend.Checked   = model.IsRecommend > 0;
                    dropTypeId.Text          = model.TypeID.ToString();
                    txtPlanName.Text         = model.PlanName;
                    txtDescrip.Text          = model.Descrip;
                    txtBeginTime.Text        = model.BEGIN_TIME.ToString("yyyy-MM-dd");
                    txtEndTime.Text          = model.END_TIME.ToString("yyyy-MM-dd");
                    rbltStatus.SelectedValue = model.State.ToString();
                    hidUsersId.Value         = model.TRAIN_ID;
                    //txtUsers.Text = B_ecan_user.GetUserName(model.BelongTo);
                    hidtearcherid.Value = model.TeacherIds;
                    // txtTearcher.Text = B_ecan_user.GetUserName(model.TeacherIds);
                    txtApplyNum.Text = model.ApplyNum.ToString();
                    txtCode.Text     = model.KeyWords;
                    if (model.KeyWords != "")
                    {
                        txtCode.Enabled = false;
                    }
                }
            }
        }
Exemple #2
0
        private void InitData()
        {
            if (type == 1 & dis == 0)
            {
                lit.Text             = "所属二维结构:";
                DrpParentid2.Visible = true;
                JBind.BindList(DrpParentid, JTree.GetClassTree(bll.GetListByParent2(CId, chapterid, 0, 1), "Parentid2", "C_Name"));
                JBind.BindList(DrpParentid2, JTree.GetClassTree(bll.GetListByParent2(CId, chapterid, 0, 2), "Parentid2", "C_Name"));
            }
            else
            {
                JBind.BindList(DrpParentid, JTree.GetClassTree(0, bll.GetListByParent(CId, chapterid, 0), "Parentid", "0", "C_Name"));
                DrpParentid.Items.Insert(0, new ListItem("根目录", "0"));
            }

            if (Id > 0)
            {//edit
                model = bll.GetModel(Id);
                if (model != null)
                {
                    txtA1.Text                 = model.A1.ToString();
                    txtA2.Text                 = model.A2.ToString();
                    txtA3.Text                 = model.A3;
                    txtA4.Text                 = model.A4;
                    txtN_OrderId.Text          = model.Sort.ToString();
                    txtName.Text               = model.C_Name;
                    drpType.Text               = model.C_Type.ToString();
                    drpColor.Text              = model.C_Color.ToString();
                    DrpParentid.SelectedValue  = model.Parentid.ToString();
                    DrpParentid2.SelectedValue = model.Parentid2.ToString();
                }
            }
            else
            {
                DrpParentid.SelectedValue = LYRequest.GetInt("parentid", 0).ToString();
            }
        }
Exemple #3
0
        private void InitData()
        {
            DataSet ds = bll.GetList("");

            JBind.BindList(DropDownList1, JTree.GetClassTree(2, ds.Tables[0], "ParentId", "0", "C_Name"));
            DropDownList1.Items.Insert(0, new ListItem("根目录", "0"));

            if (Id > 0)
            {//edit
                model = bll.GetModel(Id);
                if (model != null)
                {
                    txtC_Name.Text = model.C_Name;
                    DropDownList1.SelectedValue = model.ParentId.ToString();
                    txtOrderby.Text             = model.Orderby.ToString();
                    txtChangdi.SelectedValue    = model.isUse.ToString();
                    //txtRemark.Text = model.Remark;
                }
            }
            else
            {
                DropDownList1.SelectedValue = parentid.ToString();
            }
        }