public static string ConnectValuesWithChar(string[] arr, char connectChar, WrapCharType wrapCharType, bool trim)
        {
            string text = null;

            if (arr != null && arr.Length > 0)
            {
                string text2 = null;
                for (int i = 0; i < arr.Length; i++)
                {
                    if (arr[i] != null)
                    {
                        text2 = arr[i];
                        if (trim)
                        {
                            text2 = arr[i].Trim();
                        }
                        if (!string.IsNullOrEmpty(text2))
                        {
                            text = ConnectValues(text, OperateInputStr(text2, wrapCharType, trim), connectChar);
                        }
                    }
                }
                return(text);
            }
            return(text);
        }
 public static string ConnectValuesWithComma(IList <string> strList, WrapCharType wrapCharType, bool trim)
 {
     if (strList == null)
     {
         return(ConnectValuesWithChar(null, ',', wrapCharType, trim));
     }
     string[] array = new string[strList.Count];
     for (int i = 0; i < strList.Count; i++)
     {
         array[i] = strList[i];
     }
     return(ConnectValuesWithChar(array, ',', wrapCharType, trim));
 }
 public static string ConnectValuesWithComma(IList <int> intList, WrapCharType wrapCharType)
 {
     if (intList == null)
     {
         return(ConnectValuesWithChar(null, ',', wrapCharType));
     }
     int[] array = new int[intList.Count];
     for (int i = 0; i < intList.Count; i++)
     {
         array[i] = intList[i];
     }
     return(ConnectValuesWithChar(array, ',', wrapCharType));
 }
        public static string ConnectValuesWithChar(int[] arr, char connectChar, WrapCharType wrapCharType)
        {
            string text = null;

            if (arr != null && arr.Length > 0)
            {
                for (int i = 0; i < arr.Length; i++)
                {
                    text = ConnectValues(text, OperateInputStr(arr[i].ToString(), wrapCharType, false), connectChar);
                }
                return(text);
            }
            return(text);
        }
        private static string OperateInputStr(string inputStr, WrapCharType wrapCharType, bool trim)
        {
            if (inputStr == null)
            {
                inputStr = "";
            }
            if (trim)
            {
                inputStr = inputStr.Trim();
            }
            switch (wrapCharType)
            {
            case WrapCharType.DoubleQuotationMarks:
                return("\"" + inputStr + "\"");

            case WrapCharType.InvertedComma:
                return("'" + inputStr + "'");

            default:
                return(inputStr);
            }
        }
Beispiel #6
0
 public static string ConnectValuesWithChar(IList <Sp_pictures> list, string fieldName, WrapCharType wrapCharType, bool trim)
 {
     return(Sp_pictures.ConnectValuesWithChar(list, fieldName, ',', wrapCharType, trim));
 }
Beispiel #7
0
        public static string ConnectValuesWithChar(IList <Sp_pictures> list, string fieldName, char connectChar, WrapCharType wrapCharType, bool trim)
        {
            if (list == null || list.Count <= 0)
            {
                return(null);
            }
            IList <EntityCustom> list2 = new List <EntityCustom>();

            for (int i = 0; i < list.Count; i++)
            {
                list2.Add(list[i].EntityCustom);
            }
            return(ValuesConnectUtil.ConnectValuesWithChar(list2, fieldName, connectChar, wrapCharType, trim));
        }
 public static string ConnectValuesWithChar(IList <Sp_customProperty> list, string fieldName, WrapCharType wrapCharType, bool trim)
 {
     return(Sp_customProperty.ConnectValuesWithChar(list, fieldName, ',', wrapCharType, trim));
 }
Beispiel #9
0
 public static string ConnectValuesWithChar(IList <Sys_sysConfig> list, string fieldName, WrapCharType wrapCharType, bool trim)
 {
     return(ConnectValuesWithChar(list, fieldName, ',', wrapCharType, trim));
 }
Beispiel #10
0
 public static string ConnectValuesWithChar(IList <Sys_sysConfig> list, string fieldName, char connectChar, WrapCharType wrapCharType, bool trim)
 {
     if (list != null && list.Count > 0)
     {
         IList <EntityCustom> list2 = new List <EntityCustom>();
         for (int i = 0; i < list.Count; i++)
         {
             list2.Add(list[i].EntityCustom);
         }
         return(ValuesConnectUtil.ConnectValuesWithChar(list2, fieldName, connectChar, wrapCharType, trim));
     }
     return(null);
 }
 public static string ConnectValuesWithChar(System.Collections.Generic.IList <Sys_sysAddress> list, string fieldName, WrapCharType wrapCharType, bool trim)
 {
     return(Sys_sysAddress.ConnectValuesWithChar(list, fieldName, ',', wrapCharType, trim));
 }
 public static string ConnectValuesWithChar(System.Collections.Generic.IList <Sys_sysAddress> list, string fieldName, char connectChar, WrapCharType wrapCharType, bool trim)
 {
     if (list == null || list.Count <= 0)
     {
         return(null);
     }
     System.Collections.Generic.IList <EntityCustom> list2 = new System.Collections.Generic.List <EntityCustom>();
     for (int i = 0; i < list.Count; i++)
     {
         list2.Add(list[i].EntityCustom);
     }
     return(ValuesConnectUtil.ConnectValuesWithChar(list2, fieldName, connectChar, wrapCharType, trim));
 }
 public static string ConnectValuesWithComma(IList <EntityCustom> list, string fieldName, WrapCharType wrapCharType, bool trim)
 {
     return(ConnectValuesWithChar(list, fieldName, ',', wrapCharType, trim));
 }
 public static string ConnectValuesWithComma(object[] arr, WrapCharType wrapCharType, bool trim)
 {
     return(ConnectValuesWithChar(arr, ',', wrapCharType, trim));
 }
 public static string ConnectValuesWithComma(int[] arr, WrapCharType wrapCharType)
 {
     return(ConnectValuesWithChar(arr, ',', wrapCharType));
 }
 public static string ConnectValuesWithChar(IList <EntityCustom> list, string fieldName, char connectChar, WrapCharType wrapCharType, bool trim)
 {
     if (list != null && list.Count > 0)
     {
         string[] array = new string[list.Count];
         for (int i = 0; i < list.Count; i++)
         {
             array[i] = list[i].GetStringNull(fieldName);
         }
         return(ConnectValuesWithChar(array, connectChar, wrapCharType, trim));
     }
     return(null);
 }