Exemplo n.º 1
0
    //加载
    public void LoadDataBind()
    {
        DDLModel.DataSource     = SystemService.DictionaryTypeService.Search();
        DDLModel.DataTextField  = "Name";
        DDLModel.DataValueField = "Code";
        DDLModel.DataBind();

        if (!string.IsNullOrEmpty(Request["typeCode"]))
        {
            DDLModel.SelectedValue = Request["typeCode"];
        }

        int id = CommonClass.ReturnRequestInt("id", 0);

        if (id > 0)
        {
            TB_System_Dictionary model = SystemService.DictionaryService.Get(id);
            if (model != null)
            {
                DDLModel.SelectedValue = model.TypeCode.ToStr();
                TbName.Text            = model.Name;
                TbCode.Text            = model.Code;
                TbRemark.Text          = model.Remark;
                TbOrderBy.Text         = model.OrderBy.ToStr();
                ViewState["id"]        = model.ID;
            }
        }
    }
Exemplo n.º 2
0
    //加载
    public void LoadDataBind()
    {
        DDLModel.DataSource     = SystemService.AdverCategoryService.Search();
        DDLModel.DataTextField  = "Name";
        DDLModel.DataValueField = "ID";
        DDLModel.DataBind();

        int id = CommonClass.ReturnRequestInt("id", 0);

        if (id > 0)
        {
            TB_System_Adver model = SystemService.AdverService.Get(id);
            if (model != null)
            {
                DDLModel.SelectedValue     = model.CategoryId.ToStr();
                TbName.Text                = model.Name;
                TbCode.Text                = model.Code;
                DDLAdverType.SelectedValue = model.AdverType.ToStr();
                TbWidth.Text               = model.PicWidth;
                TbHeight.Text              = model.PicHeight;
                TbRemark.Text              = model.Remark;
                TbOrderBy.Text             = model.OrderBy.ToStr();
                ViewState["id"]            = model.ID;
            }
        }
    }
Exemplo n.º 3
0
    //加载
    public void LoadDataBind()
    {
        DDLModel.DataSource     = SystemService.ExcelModelService.Search();
        DDLModel.DataTextField  = "ModelName";
        DDLModel.DataValueField = "ID";
        DDLModel.DataBind();

        int id = CommonClass.ReturnRequestInt("id", 0);

        if (id > 0)
        {
            TB_Excel_Fields model = SystemService.ExcelFieldsService.Get(id);
            if (model != null)
            {
                DDLModel.SelectedValue = model.ModelID.ToStr();
                TbFieldName.Text       = model.FieldName;
                TbChineseName.Text     = model.ChineseName;
                TbOrderBy.Text         = model.OrderBy.ToStr();
                CbExport.Checked       = model.Type.Contains("0") ? true : false;
                CbImport.Checked       = model.Type.Contains("1") ? true : false;
                ViewState["id"]        = model.ID;
            }
        }
    }