zoukankan      html  css  js  c++  java
  • 最新的皮肤帮助类 UI_Misc_Helper

    代码
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Data;

    namespace BaseFunction
    {
        
    /// <summary>
        
    /// 处理一些控件的方法
        
    /// </summary>
        public class UI_Misc_Helper
        {
            
    /// <summary>
            
    /// 返回选中的Comobox中Text对应的value值或者是value对应的Text值
            
    /// </summary>
            
    /// <param name="combobox">combobox对象</param>
            
    /// <param name="dt_tables">要查询的表</param>
            
    /// <param name="Text">要查询的字段</param>
            
    /// <param name="Value">要返回的字段</param>
            
    /// <returns>int</returns>
            public static string GetComboBoxValueOrText(CRD.WinUI.Misc.ComboBox combobox, DataTable dt_tables, string Text, string Value)
            {
                var result 
    = dt_tables.AsEnumerable().Where(fi => fi[Text.ToString().Trim()].ToString().Trim() == combobox.Text.ToString().Trim()).FirstOrDefault();
                
    return result[Value.ToString().Trim()].ToString().Trim();
            }

        }
    }

        阅读全文:http://www.cckan.net/forum.php?mod=viewthread&tid=181                                                                                                                                                                                                                                          

  • 相关阅读:
    linux centos6.4 php连接sql server2008
    Windows下连接php5.3+sql server2008
    解决:安装SQl 2008为SQL Server代理服务提供的凭据无效
    Linux下查看文件夹或目录大小
    Sql 子查询
    Linux 删除空行
    shell中的IFS详解
    Linux 文件名匹配
    Linux Shell逻辑运算符和表达式详解
    转:shell 经典, shell 十三问
  • 原文地址:https://www.cnblogs.com/sufei/p/1648038.html
Copyright © 2011-2022 走看看