Esempio n. 1
0
    private void BindDropDownList()
    {
        Js.BLL.BaseDal dal = new Js.BLL.BaseDal("BU_Enterprise");
        string filter = "1=1";
        if (Session["UserType"].ToString() == "EP")
            filter = string.Format("EnterpriseID='{0}'", Session["EnterpriseID"].ToString());
        this.ddlEnterpriseID.DataSource = dal.GetIDNameList(filter);
        this.ddlEnterpriseID.DataTextField = "IDName";
        this.ddlEnterpriseID.DataValueField = "ID";
        this.ddlEnterpriseID.DataBind();

        if (Session["EnterpriseID"] != null)
            this.ddlEnterpriseID.SelectedValue = Session["EnterpriseID"].ToString();
    }
Esempio n. 2
0
    /// <summary>
    /// 綁定查詢
    /// </summary>
    private void dataSearch()
    {
        Js.BLL.Sys.SysComDal dal = new Js.BLL.Sys.SysComDal();
        this.ddlFieldName.DataSource = dal.SearchTable(FormID, false).Tables[0];
        this.ddlFieldName.DataTextField = "FieldCName";
        this.ddlFieldName.DataValueField = "FieldName";
        this.ddlFieldName.DataBind();

        this.ddlPageSize.Items.Add(new ListItem("15", "15"));
        this.ddlPageSize.Items.Add(new ListItem("20", "20"));
        this.ddlPageSize.Items.Add(new ListItem("25", "25"));
        this.ddlPageSize.Items.Add(new ListItem("30", "30"));
        this.ddlPageSize.Items.Add(new ListItem("40", "40"));
        this.ddlPageSize.Items.Add(new ListItem("50", "50"));

        Js.BLL.BaseDal bdal = new Js.BLL.BaseDal("BU_Enterprise");
        string filter = "1=1";
        if (Session["UserType"].ToString() == "EP")
            filter = string.Format("EnterpriseID='{0}'", Session["EnterpriseID"].ToString());
        this.ddlEnterpriseID.DataSource = bdal.GetIDNameList(filter);
        this.ddlEnterpriseID.DataTextField = "IDName";
        this.ddlEnterpriseID.DataValueField = "ID";
        this.ddlEnterpriseID.DataBind();

        if (Session["UserType"].ToString() == "BU")
            this.ddlEnterpriseID.Items.Insert(0, new ListItem("", ""));
        if (Session["EnterpriseID"] != null)
            this.ddlEnterpriseID.SelectedValue = Session["EnterpriseID"].ToString();
    }
Esempio n. 3
0
 private void BindDropDownList()
 {
     Js.BLL.BaseDal dal = new Js.BLL.BaseDal("BU_EnterpriseCategory");
     DataTable dt = dal.GetIDNameList("");
     this.ddlCategoryID.DataSource = dt;
     this.ddlCategoryID.DataTextField = "IDName";
     this.ddlCategoryID.DataValueField = "ID";
     this.ddlCategoryID.DataBind();
 }
Esempio n. 4
0
 private void BindDropDownList()
 {
     Js.BLL.BaseDal dal = new Js.BLL.BaseDal("BU_Department");
     DataTable dt = dal.GetIDNameList("");
     this.ddlDepartmentID.DataSource = dt;
     this.ddlDepartmentID.DataTextField = "IDName";
     this.ddlDepartmentID.DataValueField = "ID";
     this.ddlDepartmentID.DataBind();
 }
Esempio n. 5
0
    private void BindDepartment()
    {
        Js.BLL.BaseDal dal = new Js.BLL.BaseDal("EP_Department", cnKey);

        string filter = string.Format("EnterpriseID='{0}'", this.ddlEnterpriseID.SelectedValue);
        DataTable dt = dal.GetIDNameList(filter);
        this.ddlDepartmentID.DataSource = dt;
        this.ddlDepartmentID.DataTextField = "IDName";
        this.ddlDepartmentID.DataValueField = "ID";
        this.ddlDepartmentID.DataBind();
    }
Esempio n. 6
0
 private void BindEdll()
 {
     Js.BLL.BaseDal dal = new Js.BLL.BaseDal("LB_ProductionUnit",cnKey);
     DataTable dt = dal.GetIDNameList("");
     this.ddlProductionUnitID.DataSource = dt;
     this.ddlProductionUnitID.DataTextField = "IDName";
     this.ddlProductionUnitID.DataValueField = "ID";
     this.ddlProductionUnitID.DataBind();
 }