Ejemplo n.º 1
0
    //加载
    public void LoadDataBind()
    {
        DDLModule.DataSource     = DataToCacheHelper.GetAllDictionaries().Where(w => w.TypeCode == "04").ToList();
        DDLModule.DataTextField  = "Name";
        DDLModule.DataValueField = "Code";
        DDLModule.DataBind();

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

        if (ID > 0)
        {
            var model = VisionService.ExamVisionSubjectService.Get(ID);
            if (model.ID.ToInt() > 0)
            {
                Picture.Url             = model.PicUrl;
                FckDesc.Value           = model.Description;
                DDLModule.SelectedValue = model.Type;
                TbName.Text             = model.Name;
                TbOrderBy.Text          = model.OrderBy.ToStr();
                TbResult.Text           = model.Result;

                ViewState["id"] = model.ID;
            }
        }
    }
 /// <summary>
 /// To display Module
 /// </summary>
 public void VET_Get_Module()
 {
     try
     {
         BLL_VET_VettingLib objBLLVetLib = new BLL_VET_VettingLib();
         DataTable          dtModule     = objBLLVetLib.VET_Get_Module();
         DDLModule.DataSource     = dtModule;
         DDLModule.DataTextField  = "Name";
         DDLModule.DataValueField = "Module_ID";
         DDLModule.DataBind();
         DDLModule.Items.Insert(0, new ListItem("-Select-", "0"));
     }
     catch (Exception ex)
     {
         UDFLib.WriteExceptionLog(ex);
         string js = "alert('" + UDFLib.GetException("SystemError/ GeneralMessage") + "');";
         ScriptManager.RegisterStartupScript(this, this.GetType(), "error", js, true);
     }
 }
Ejemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ButtonDelete.Attributes.Add("onclick", "return confirm('确认删除这条信息吗?')");
        if (!IsPostBack)
        {
            ViewState["PageIndex"] = 1;
            ViewState["search"]    = "";
            LoadDataBind();

            DDLModule.DataSource     = DataToCacheHelper.GetAllDictionaries().Where(w => w.TypeCode == "04").ToList();
            DDLModule.DataTextField  = "Name";
            DDLModule.DataValueField = "Code";
            DDLModule.DataBind();

            ListItem li = new ListItem();
            li.Text  = "==请选择类型==";
            li.Value = "";
            DDLModule.Items.Insert(0, li);
        }
    }
Ejemplo n.º 4
0
    //加载
    public void LoadDataBind()
    {
        DDLModule.DataSource     = DataToCacheHelper.GetAllDictionaries().Where(w => w.TypeCode == "03").ToList();
        DDLModule.DataTextField  = "Name";
        DDLModule.DataValueField = "Code";
        DDLModule.DataBind();

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

        if (ID > 0)
        {
            var model = BasicService.ExamPrincipleService.Get(ID);
            if (model.ID.ToInt() > 0)
            {
                Picture.Url             = model.PicUrl;
                FckDesc.Value           = model.Description;
                DDLModule.SelectedValue = model.Module;
                ViewState["id"]         = model.ID;
            }
        }
    }