Example #1
0
        /// <summary>
        /// wt修改,适用App版本
        /// </summary>
        /// <param name="ids"></param>
        /// <param name="action"></param>
        /// <returns></returns>
        public static string GetDtyFileByIdsApp(object ids, object action)
        {
            string strResult = "";

            if (ids.ToString() == "")
            {
                return(strResult);
            }
            DataSet ds = new ZhongLi.Bll.sys_Dictionary().GetList("ID in (" + ids.ToString().Trim(',') + ")");

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                DataTable dt = ds.Tables[0];
                foreach (DataRow dr in dt.Rows)
                {
                    if (action != null && action.ToString() == "index")
                    {
                        strResult += "<img src=\"" + dr["Filepath"] + "\"  />";
                    }
                    else
                    {
                        strResult += "<img src=\"" + dr["Filepath"] + "\" />";
                    }
                }
            }
            if (strResult != "")
            {
                strResult = strResult.Trim(',');
            }
            return(strResult);
        }
Example #2
0
        //#region 取整数和小数
        //public static float GetInt(int i)
        //{
        //    float f = SettingsListLoad().YearIncome;
        //    string[] s = f.ToString().Split('.');
        //    if (i == 1)
        //    {
        //        return Convert.ToSingle(s[0]);
        //    }
        //    else
        //    {
        //        return Convert.ToSingle(s[1]);
        //    }


        //}
        //#endregion

        #region 获取字典表信息
        public static string GetDictionaryName(object id)
        {
            string strResult = string.Empty;

            if (id != null && id.ToString() != "" && Convert.ToInt32(id) > 0)
            {
                strResult = new ZhongLi.Bll.sys_Dictionary().GetModel(Convert.ToInt32(id)).DtyName + "";
            }
            return(strResult);
        }
Example #3
0
        public static string GetDtyNameByIds(object ids)
        {
            string strResult = "未设置";

            if (ids.ToString() == "")
            {
                return(strResult);
            }
            DataSet ds = new ZhongLi.Bll.sys_Dictionary().GetList("ID in (" + ids.ToString().Trim(',') + ")");

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                DataTable dt = ds.Tables[0];
                foreach (DataRow dr in dt.Rows)
                {
                    strResult += dr["DtyName"] + ",";
                }
            }
            if (strResult != "")
            {
                strResult = strResult.Trim(',');
            }
            return(strResult);
        }