Пример #1
0
        [HttpPost]// To update options of all the view
        public bool UpdatePreferenceColumnOfViewAll(int idView, string[] primaryList, string[] secondaryLsit)
        {
            SQLServerManager SQL              = new SQLServerManager(SqlCnxStr);
            string           primaryListStr   = "";
            string           secondaryListStr = "";

            if (primaryList != null)
            {
                foreach (string ele in primaryList)
                {
                    primaryListStr += ele + ", ";
                }

                primaryListStr.Remove(primaryListStr.Length - 2, 2);
            }

            if (secondaryLsit != null)
            {
                foreach (string ele in secondaryLsit)
                {
                    secondaryListStr += ele + ", ";
                }

                secondaryListStr.Remove(secondaryListStr.Length - 2, 2);
            }

            return(SQL.SP_UpdatePreferenceColumnOfViewAll(SqlCnxStr, idView, primaryListStr, secondaryListStr));
        }