• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ASPxComboBox类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ASPxComboBox的典型用法代码示例。如果您正苦于以下问题:C# ASPxComboBox类的具体用法?C# ASPxComboBox怎么用?C# ASPxComboBox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ASPxComboBox类属于命名空间,在下文中一共展示了ASPxComboBox类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: SeleccionarItemCombo

 public static void SeleccionarItemCombo(ref ASPxComboBox combo, string valor, string texto)
 {
     combo.SelectedIndex = -1;
     if ((combo.Items.FindByValue(valor) == null))
         combo.Items.Insert(0, new ListEditItem(texto, valor));
     combo.Items.FindByValue(valor).Selected = true;
 }
开发者ID:kenchic,项目名称:SAF,代码行数:7,代码来源:Utilidad.cs


示例2: FillCombo_OLD_SYSTEM

    protected void FillCombo_OLD_SYSTEM(ASPxComboBox cmb, string SYS_CODE)
    {
        try
        {
            if (string.IsNullOrEmpty(SYS_CODE)) return;
            string SQL = "";
            SQL = " SELECT  CTLT_SYS_USER_RIGHT.USER_RIGHT ROLE_ID";
            SQL += " ,SYS_CODE";
            SQL += " ,CTLT_USER_RIGHT.USER_RIGHT_DESC ROLE_NAME";
            SQL += " FROM CTLT_SYS_USER_RIGHT ";
            SQL += " LEFT JOIN CTLT_USER_RIGHT ON CTLT_USER_RIGHT.USER_RIGHT = CTLT_SYS_USER_RIGHT.USER_RIGHT";
            SQL += " WHERE SYS_CODE='" + SYS_CODE + "'";

            //string SQL = string.Format("select ROLE_ID,ROLE_NAME from ODS_SYSTEM_ROLE WHERE SYS_CODE='{0}' ORDER BY [ROLE_NAME]", SYS_CODE);
            SqlDataAdapter DA = new SqlDataAdapter(SQL, OPM_BL.DefaultConnectionString);
            DataTable DTRole = new DataTable();
            DA.Fill(DTRole);
            cmb.DataSource = DTRole;
            cmb.ValueField = "ROLE_ID";
            cmb.TextField = "ROLE_NAME";
            cmb.DataBindItems();

            //AccessDataSource2.FilterExpression = "  SYS_CODE='" + SYS_CODE + "'";
            //DataView dv = (DataView)AccessDataSource2.Select(DataSourceSelectArguments.Empty);
            //DataTable DT = dv.ToTable();
        }
        catch (Exception ex)
        {

        }
    }
开发者ID:TIT-tech,项目名称:OPM_BO,代码行数:31,代码来源:CTLT_EMP.aspx.cs


示例3: addButton4Cmb

    public static void addButton4Cmb(System.Web.UI.Page mypage, ASPxComboBox cmb, int Buttontype, string popupID)
    {
        string prefixCookie = mypage.GetType().ToString().Replace("ASP.", "");
        switch (Buttontype)
        {
            case 0://add cả 2 button
                AddFavButton4Cmb(cmb);
                AddNewButton4Cmb(cmb);
                cmb.ClientSideEvents.Init = "function(s,e){ GetDefaultValue4Cmb(s,'" + prefixCookie + "_" + cmb.ClientInstanceName + "'); }";
                cmb.ClientSideEvents.ButtonClick = "function(s,e){ if( e.buttonIndex == 0){setCookie('" + prefixCookie + "_" + cmb.ClientInstanceName + "',s.GetValue(),365);} else { popupWindow4Cmb('" + popupID + "');} }";
                break;
            case 1://chi add button new
                AddNewButton4Cmb(cmb);
                cmb.ClientSideEvents.ButtonClick = "function(s,e){ popupWindow4Cmb('" + popupID + "'); }";
                break;
            case 2://chỉ add button fav
                AddNewButton4Cmb(cmb);
                cmb.ClientSideEvents.Init = "function(s,e){ GetDefaultValue4Cmb(s,'" + prefixCookie + "_" + cmb.ClientInstanceName + "'); }";
                cmb.ClientSideEvents.ButtonClick = "function(s,e){ setCookie('" + prefixCookie + "_" + cmb.ClientInstanceName + "',s.GetValue(),365); }";
                break;
        }
        /*
         * <ButtonStyle BackColor="Transparent">
                        <Paddings Padding="0px" />
                        <Border BorderStyle="None" />
                    </ButtonStyle>
         */
        cmb.ClientSideEvents.GotFocus = "function(s,e){ s.SelectAll(); }";

        //cmb.ButtonStyle.BackColor = Color.Transparent;
        //cmb.ButtonStyle.Width = Unit.Pixel(15);
        //cmb.ButtonStyle.Paddings.Padding = Unit.Pixel(0);
        //cmb.ButtonStyle.Border.BorderStyle = BorderStyle.None;
        //cmb.SkinID = "cmbDefault";
    }
开发者ID:trantrung2608,项目名称:ilinkbay,代码行数:35,代码来源:ControlUtils.cs


示例4: FillCombo

    protected void FillCombo(ASPxComboBox cmb, string SYS_CODE)
    {
        try
        {
            if (string.IsNullOrEmpty(SYS_CODE)) return;
            //AccessDataSource2.SelectParameters.Clear();
            ////string SQL = AccessDataSource2.SelectCommand;
            //AccessDataSource2.SelectCommand = " select SYS_CODE ,ROLE_ID,ROLE_NAME from ODS_SYSTEM_ROLE  ";
            //AccessDataSource2.SelectCommand = SQL;

            string SQL = string.Format("select ROLE_ID,ROLE_NAME from ODS_SYSTEM_ROLE WHERE SYS_CODE='{0}' ORDER BY [ROLE_NAME]", SYS_CODE);
            SqlDataAdapter DA = new SqlDataAdapter(SQL, OPM_BL.DefaultConnectionString);
            DataTable DTRole = new DataTable();
            DA.Fill(DTRole);
            cmb.DataSource = DTRole;
            cmb.ValueField = "ROLE_ID";
            cmb.TextField = "ROLE_NAME";
            cmb.DataBindItems();

            //AccessDataSource2.FilterExpression = "  SYS_CODE='" + SYS_CODE + "'";
            //DataView dv = (DataView)AccessDataSource2.Select(DataSourceSelectArguments.Empty);
            //DataTable DT = dv.ToTable();
        }
        catch (Exception ex)
        {

        }
    }
开发者ID:TIT-tech,项目名称:OPM_BO,代码行数:28,代码来源:Default2.aspx.cs


示例5: AddFavButton4Cmb

 public static void AddFavButton4Cmb(ASPxComboBox cmb)
 {
     var btnFav = new EditButton { Position = ButtonsPosition.Left };
     btnFav.Image.Url = "~/img/btnico/star.png";
     btnFav.Image.Width = Unit.Pixel(16);
     btnFav.ToolTip = "Nhấn vào đây để chọn mục này là mặc định cho lần sau.";
     cmb.Buttons.Add(btnFav);
 }
开发者ID:trantrung2608,项目名称:ilinkbay,代码行数:8,代码来源:ControlUtils.cs


示例6: FillSectionCombo

 protected void FillSectionCombo(ASPxComboBox cmb, string SiteID)
 {
     if (SiteID == "0") return;
     cmb.DataSourceID = "ObjectDataSourceSection";
     ObjectDataSourceSection.SelectParameters[0].DefaultValue = SiteID;
     cmb.DataBindItems();
     cmb.Items.Insert(0, new ListEditItem("", null)); // Null Item
 }
开发者ID:ramyothman,项目名称:RBM,代码行数:8,代码来源:Manage.aspx.cs


示例7: AddNewButton4Cmb

    /*
     <dx:EditButton Position="Left" ToolTip="<%$ Resources:Control, DefaultButton.Tooltip %>">
                                <Image Height="16px" Url="~/img/btnico/star.png" Width="16px">
                                </Image>
                            </dx:EditButton>
                            <dx:EditButton ToolTip="<%$ Resources:Control, AddButton.Tooltip %>">
                                <Image Url="~/img/common/Add.png" Width="16px">
                                </Image>
                            </dx:EditButton>
     */
    public static void AddNewButton4Cmb(ASPxComboBox cmb)
    {
        var btnNew = new EditButton { Position = ButtonsPosition.Right };
        btnNew.Image.Url = "~/img/common/Add.png";
        btnNew.Image.Width = Unit.Pixel(16);
        btnNew.ToolTip = "Nhấn vào đây để tạo mới thêm danh mục này";

        cmb.Buttons.Add(btnNew);
    }
开发者ID:trantrung2608,项目名称:ilinkbay,代码行数:19,代码来源:ControlUtils.cs


示例8: buildcmbButton

 /// <summary>
 /// Tao nut add/fav/refresh
 /// </summary>
 /// <param name="cmb">Truyen vao control combobox</param>
 /// <param name="type">Truyen vao loai nut. 0 : Fav; 1:Fav+Add;2:Fav+Add+Refresh;3:Only Refresh;4:Only Add;5: Fav+Refresh</param>
 public void buildcmbButton(ASPxComboBox cmb, int type, string popupCode = "")
 {
     int modulePage = -1;
     try
     {
         Int32.TryParse(CU.getCurrentModuleID().ToString(), out modulePage);
     }
     catch (System.NullReferenceException) { }
     int width = 500;
     int height = 500;
     string title = "Error load Page!!!";
     string param = "";
     DataTable dtPopupWindow = new DataTable();
     dtPopupWindow = SY_GetModuleID_for_PopUpcontrol(popupCode);
     if (dtPopupWindow.Rows.Count > 0)
     {
         SiAuto.Main.LogDataTable(dtPopupWindow);
         moduleID = int.Parse(dtPopupWindow.Rows[0]["moduleID"].ToString());
         width = int.Parse(dtPopupWindow.Rows[0]["width"].ToString());
         height = int.Parse(dtPopupWindow.Rows[0]["height"].ToString());
         title = dtPopupWindow.Rows[0]["title"].ToString();
         param = dtPopupWindow.Rows[0]["paramArray"].ToString();
     }
     else
         return;
     SiAuto.Main.LogInt("ModulePage=", modulePage);
     SiAuto.Main.LogInt("ModuleID=", moduleID);
     switch (type)
     {
         case 0:
             buildFavBtn(cmb, modulePage);
             break;
         case 1:
             if (checkPermissionBtn(moduleID))
                 buildFavAddBtn(cmb, popupCode, modulePage, moduleID, width, height, title, param);
             else buildFavBtn(cmb, modulePage);
             break;
         case 2:
             if (checkPermissionBtn(moduleID))
                 buildAllBtn(cmb, popupCode, modulePage, moduleID, width, height, title, param);
             else buildFavRefresh(cmb, modulePage);
             break;
         case 3:
             buildRefreshBtn(cmb);
             break;
         case 4:
             if (checkPermissionBtn(moduleID))
                 buildAddBtn(cmb, popupCode, moduleID, width, height, title, param);
             break;
         case 5:
             buildFavRefresh(cmb, modulePage);
             break;
         default:
             break;
     }
 }
开发者ID:trantrung2608,项目名称:ilinkbay,代码行数:61,代码来源:BasePage.cs


示例9: InitDurationCombo

 static void InitDurationCombo(ASPxComboBox cbSnooze) {
     cbSnooze.Items.Clear();
     TimeSpan[] snoozeTimeSpans = GetTimeSpans();
     int length = snoozeTimeSpans.Length;
     for (int i = 0; i < length; i++) {
         TimeSpan span = snoozeTimeSpans[i];
         cbSnooze.Items.Add(new ListEditItem(ConvertTimeSpanToString(span), span));
     }
     cbSnooze.SelectedIndex = 4;
 }
开发者ID:derjabkin,项目名称:eXpand,代码行数:10,代码来源:DurationPropertyEditor.cs


示例10: RenderControl

        public List<WebControl> RenderControl(XmlNode xmlControl)
        {
            base.Initialize(xmlControl);

            ASPxComboBox aspxListBox = new ASPxComboBox
            {
                ID = _PropertyMapper.GetID(),
                ClientInstanceName = _PropertyMapper.GetID()
            };

            if (string.IsNullOrEmpty(_PropertyMapper.GetDefault()))
                aspxListBox.SelectedIndex = 0;

            aspxListBox.Callback += new DevExpress.Web.ASPxClasses.CallbackEventHandlerBase(aspxListBox_Callback);
            XmlNode valuesNode = _PropertyMapper.GetValuesNode();

            // Carga los datos de la lista
            foreach (XmlNode xmlValueNode in valuesNode.ChildNodes)
            {
                ListEditItem listEditItem = new ListEditItem();

                    listEditItem.Value = xmlValueNode.GetAttribute("CCLAVE");
                    listEditItem.Text = xmlValueNode.GetAttribute("CTEXTO");
                    listEditItem.Selected = (_PropertyMapper.GetDefault() == xmlValueNode.GetAttribute("CCLAVE")) ? true : false;

                    aspxListBox.Items.Add(listEditItem);

            }

            try
            {
                if (xmlControl.GetAttribute("CCONTROLASOC") != null)
                {
                    aspxListBox.ClientSideEvents.ValueChanged = "function(s, e) {" + xmlControl.GetAttribute("CCONTROLASOC") + ".PerformCallback(" + _PropertyMapper.GetID() + ".GetValue());}";
                    aspxListBox.ClientSideEvents.Init = "function(s, e) {" + xmlControl.GetAttribute("CCONTROLASOC") + ".PerformCallback(" + _PropertyMapper.GetID() + ".GetValue());}";
                }
            }
            catch (Exception)
            {
            }

            _Controls.Add(aspxListBox);

            return _Controls;
        }
开发者ID:pampero,项目名称:cgControlPanel,代码行数:45,代码来源:ListBox.cs


示例11: FillEditor

        void FillEditor(ASPxComboBox editor) {
            if (editor == null) return;
            editor.Items.Clear();
            editor.ValueType = GetComboBoxValueType();

            IEnumerable dataSource = GetDataSource();

            if (_propertyType.IsGenericType && _propertyType.GetGenericTypeDefinition() == typeof(Nullable<>)) {
                editor.Items.Add(CaptionHelper.NullValueText, null);
            }

            if (dataSource != null)
                foreach (object value in dataSource) {
                    if (value is ListEditItem)
                        editor.Items.Add(value as ListEditItem);
                    else
                        editor.Items.Add(CreateEditItem(value));
                }
        }
开发者ID:noxe,项目名称:eXpand,代码行数:19,代码来源:EnumPropertyEditor.cs


示例12: BindDropDown

        /// <summary>
        /// Binds the DataTable to ComboBox list with given value and text fields
        /// </summary>
        /// <param name="cmbBox">Name of the ComboBox list to process</param>
        /// <param name="dt">DataTable to Bind</param>
        /// <param name="strValue">Value field name as string</param>
        /// <param name="strText">Text fiels name as string</param>
        public static void BindDropDown(ASPxComboBox cmbBox, DataTable dt, string strValue, string strText)
        {
            // clsDataFunctionsBAL objFunctions = null;

            try
            {
                if (DataTableHasRows(dt))
                {
                    cmbBox.DataSource = dt;
                    cmbBox.ValueField = strValue;
                    cmbBox.TextField = strText;
                    cmbBox.DataBindItems();
                }
            }
            catch (Exception ex)
            {
                //objFunctions = new clsDataFunctionsBAL();
                //objFunctions.SaveErrorLog(ex.Message, m_strModule, MethodBase.GetCurrentMethod().Name);
            }
            finally
            {
               // objFunctions = null;
            }
        }
开发者ID:vijaymca,项目名称:Dotnet,代码行数:31,代码来源:clsUtils.cs


示例13: SetDDLORGL3

    public static void SetDDLORGL3(ASPxComboBox ddl)
    {
        try
        {
            string sql = "SELECT ORG_SERIAL,ORG_NAME,ORG_ABBR FROM vw_SMM_ORG WHERE ORG_LEVEL IN(3) order by ORG_NAME";
            SqlDataAdapter da = new SqlDataAdapter(sql, StaticDefaultConnectionString);
            DataTable dt = new DataTable();
            da.Fill(dt);

            DataRow row;
            row = dt.NewRow();
            //row["ORG_SERIAL"] = "0";
            //row["ORG_NAME"] = "--ALL--";
            //row["ORG_ABBR"] = "";
            //dt.Rows.InsertAt(row, 0);

            if (dt.Rows.Count > 0)
            {
                ddl.Columns.Clear();
                ddl.Columns.Add("ORG_NAME", "ชื่อหน่วยงาน");
                //ddl.Columns.Add("ORG_ABBR", "ชื่อย่อ");

                ddl.ValueField = "ORG_SERIAL";
                ddl.TextField = "ORG_NAME";

                ddl.DataSource = dt;
                ddl.DataBind();
            }
        }
        catch (Exception ex)
        {

        }
    }
开发者ID:TIT-tech,项目名称:OPM_BO,代码行数:34,代码来源:OPM_BL.cs


示例14: SetDDLORG

    public static void SetDDLORG(ASPxComboBox ddl)
    {
        try
        {
            string sql = "SELECT '' ORG_SERIAL,'เลือกหน่วยงาน' ORG_NAME,'' ORG_ABBR UNION ALL SELECT CONVERT(varchar,ORG_SERIAL) ORG_SERIAL,ORG_NAME,ORG_ABBR FROM vw_SMM_ORG";
            SqlDataAdapter da = new SqlDataAdapter(sql, StaticDefaultConnectionString);
            DataTable dt = new DataTable();
            da.Fill(dt);

            if (dt.Rows.Count > 0)
            {
                ddl.Columns.Clear();
                ddl.Columns.Add("ORG_NAME", "ชื่อหน่วยงาน");
                ddl.Columns.Add("ORG_ABBR", "ชื่อย่อ");

                ddl.ValueField = "ORG_SERIAL";
                ddl.TextField = "ORG_NAME";

                ddl.DataSource = dt;
                ddl.DataBind();
            }
        }
        catch (Exception ex)
        {

        }
    }
开发者ID:TIT-tech,项目名称:OPM_BO,代码行数:27,代码来源:OPM_BL.cs


示例15: SetDDLJDSUBGROP34

    public static void SetDDLJDSUBGROP34(ASPxComboBox ddl,int GroupID)
    {
        try
        {
            string sql = "SELECT SUB_GROUP_ID,SUB_GROUP_NAME FROM SMM_JD_SUB_GROUP34 WHERE GROUP_ID="+ GroupID ;
            SqlDataAdapter da = new SqlDataAdapter(sql, StaticDefaultConnectionString);
            DataTable dt = new DataTable();
            da.Fill(dt);

            if (dt.Rows.Count > 0)
            {

                ddl.ValueField = "SUB_GROUP_ID";
                ddl.TextField = "SUB_GROUP_NAME";

                ddl.DataSource = dt;
                ddl.DataBind();
            }
        }
        catch (Exception ex)
        {

        }
    }
开发者ID:TIT-tech,项目名称:OPM_BO,代码行数:24,代码来源:OPM_BL.cs


示例16: SetDDLJDEVALSCORE

    public static void SetDDLJDEVALSCORE(ASPxComboBox ddl)
    {
        try
        {

            DataTable dt =new DataTable();
            dt.Columns.Add("Score_ID");
            dt.Columns.Add("Score_Name");

            DataRow dr ;
            dr=dt.NewRow();
            dr["Score_ID"]="0";
            dr["Score_Name"]="เลือกระดับ";
            dt.Rows.Add(dr);

            dr=dt.NewRow();
            dr["Score_ID"]="1";
            dr["Score_Name"]="ระดับ 1";
            dt.Rows.Add(dr);

            dr=dt.NewRow();
            dr["Score_ID"]="2";
            dr["Score_Name"]="ระดับ 2";
            dt.Rows.Add(dr);

            dr=dt.NewRow();
            dr["Score_ID"]="3";
            dr["Score_Name"]="ระดับ 3";
            dt.Rows.Add(dr);

            dr=dt.NewRow();
            dr["Score_ID"]="4";
            dr["Score_Name"]="ระดับ 4";
            dt.Rows.Add(dr);

            dr=dt.NewRow();
            dr["Score_ID"]="5";
            dr["Score_Name"]="ระดับ 5";
            dt.Rows.Add(dr);

            ddl.ValueField = "Score_ID";
            ddl.TextField = "Score_Name";

            ddl.DataSource = dt;
            ddl.DataBind();

        }
        catch (Exception ex)
        {

        }
    }
开发者ID:TIT-tech,项目名称:OPM_BO,代码行数:52,代码来源:OPM_BL.cs


示例17: Set_DDLORG_LV3_BY_LV1_2

    public static void Set_DDLORG_LV3_BY_LV1_2(ASPxComboBox ddl, string wh)
    {
        try
        {
            string sql = "select ORG_SERIAL,ORG_NAME,ORG_ABBR from vw_SMM_ORG_LEVEL3 where 1=1 ";
            if (wh != "76") { sql += " AND UPPER_ORG_SERIAL = " + wh; }
            sql += " Order by ORG_SERIAL";
            SqlDataAdapter da = new SqlDataAdapter(sql, StaticDefaultConnectionString);
            DataTable dt = new DataTable();
            da.Fill(dt);

            if (dt.Rows.Count > 0)
            {
                ddl.Columns.Clear();

                ddl.ValueField = "ORG_SERIAL";
                ddl.TextField = "ORG_NAME";

                ddl.DataSource = dt;
                ddl.DataBind();
            }
            else
            {
                ddl.Columns.Clear();

                ddl.ValueField = "ORG_SERIAL";
                ddl.TextField = "ORG_NAME";

                ddl.DataSource = dt;
                ddl.DataBind();
            }
        }
        catch (Exception ex)
        {

        }
    }
开发者ID:TIT-tech,项目名称:OPM_BO,代码行数:37,代码来源:OPM_BL.cs


示例18: SetDDLPositionNameOtherType

    // แสดงชื่อตำแหน่งของลูกจ้างโครงการ ไกท์ไลน์
    public static void SetDDLPositionNameOtherType(ASPxComboBox ddl)
    {
        try
        {
            string sql = "";
             sql += " SELECT  ROW_NUMBER() OVER(ORDER BY LINE_INORG ASC) AS Row,LINE_INORG FROM ( ";
             sql += "   SELECT DISTINCT  LINE_INORG  FROM PSST_POSITION  WHERE PER_TYPE in ('23','Z0') AND POS_Status=1 AND LINE_INORG IS NOT NULL  ";
             sql += " )AS TB ORDER BY LINE_INORG ";

            SqlDataAdapter da = new SqlDataAdapter(sql, StaticDefaultConnectionString);
            DataTable dt = new DataTable();
            da.Fill(dt);

            if (dt.Rows.Count > 0)
            {
                ddl.Columns.Clear();
                ddl.Columns.Add("LINE_INORG", "ตำแหน่ง");

                ddl.ValueField = "Row";
                ddl.TextField = "LINE_INORG";

                ddl.DataSource = dt;
                ddl.DataBind();
            }
        }
        catch (Exception ex)
        {

        }
    }
开发者ID:TIT-tech,项目名称:OPM_BO,代码行数:31,代码来源:OPM_BL.cs


示例19: SetDDLPerTypeISMAIN1

    public static void SetDDLPerTypeISMAIN1(ASPxComboBox ddl, bool isAll = false)
    {
        try
        {
            string sql = "select PER_TYPE,PER_TYPE_NAME from SMM_PER_TYPE Where IS_MAIN =1 ORDER BY PER_TYPE_NAME";

            DataTable dt = GetDatatable(sql, null);
            if (dt.Rows.Count > 0)
            {
                if (isAll == true)
                {
                    DataRow dr = dt.NewRow();
                    dr["PER_TYPE"] = "0";
                    dr["PER_TYPE_NAME"] = "ทั้งหมด";
                    dt.Rows.InsertAt(dr, 0);
                }

                ddl.ValueField = "PER_TYPE";
                ddl.TextField = "PER_TYPE_NAME";

                ddl.DataSource = dt;
                ddl.DataBind();
            }
        }
        catch (Exception ex)
        {

        }
    }
开发者ID:TIT-tech,项目名称:OPM_BO,代码行数:29,代码来源:OPM_BL.cs


示例20: SetDDLPERSONBYPERTYPE

    public static void SetDDLPERSONBYPERTYPE(ASPxComboBox ddl, string per_type, bool IsAll = false)
    {
        try
        {
            string sql = " select ID,PREFIX_NAME + NAME + ' ' + SURNAME PER_FULLNAME   ";
            sql += " from vw_CMN_PERSON  ";
            sql += " where name is not null and  per_type='" + per_type + "'  ";
            sql += " AND RETIRE_DATE>GetDate() ";
            sql += " AND ID IN ( SELECT ID  FROM PSST_POSITION  WHERE PER_TYPE='" + per_type  + "' AND POS_STATUS=1 AND LENGTH_CODE LIKE 'K%') ";
            sql += " order by name,surname ";

            //string sql = "select ID,PREFIX_NAME + NAME + ' ' + SURNAME PER_FULLNAME  from vw_CMN_PERSON ";
            //sql += " where name is not null and  per_type='" + per_type + "' order by name,surname";

            DataTable dt = new DataTable();
            dt = OPM_BL.GetDatatable(sql, null);

            if (dt.Rows.Count > 0)
            {
                //ddl.Columns.Clear();
                //ddl.Columns.Add("ID", "เลขที่");
                //ddl.Columns.Add("PER_FULLNAME", "ชื่อ");

                if (IsAll == true)
                {
                    DataRow dr = dt.NewRow();
                    dr["ID"] = "0";
                    dr["PER_FULLNAME"] = "ทั้งหมด";
                    dt.Rows.InsertAt(dr, 0);
                }

                ddl.ValueField = "ID";
                ddl.TextField = "PER_FULLNAME";

                ddl.DataSource = dt;
                ddl.DataBind();

                //ddl.SelectedIndex = 0;
            }
        }
        catch (Exception ex)
        {

        }
    }
开发者ID:TIT-tech,项目名称:OPM_BO,代码行数:45,代码来源:OPM_BL.cs



注:本文中的ASPxComboBox类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ASPxGridView类代码示例发布时间:2022-05-24
下一篇:
C# ASObject类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap