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                                                                                                                                                                                                                                          

  • 相关阅读:
    [BZOJ3195][Jxoi2012]奇怪的道路
    [codeforces696B]Puzzles
    [codeforces464D]World of Darkraft
    [COGS1000]伊吹萃香 最短路
    [BZOJ4653][NOI2016]区间 贪心+线段树
    [BZOJ4540][HNOI2016]序列 莫队
    [BZOJ4870][Shoi2017]组合数问题 dp+矩阵乘
    Loj 2005 相关分析
    Loj 114 k大异或和
    bzoj 2212 Tree Rotations
  • 原文地址:https://www.cnblogs.com/sufei/p/1648038.html
Copyright © 2011-2022 走看看