コード例 #1
0
        public vmCmnMenu GetMenuByID(int?id)
        {
            vmCmnMenu objMenu = null;

            try
            {
                objMenu = objMenuService.GetMenuByID(id);
            }
            catch (Exception e)
            {
                e.ToString();
            }
            return(objMenu);
        }
コード例 #2
0
        /// <summary>
        /// Get Data From Database
        /// <para>Use it when to retive single data through a stored procedure</para>
        /// </summary>
        public vmCmnMenu GetMenuByID(int?id)
        {
            GenericFactoryFor_Menu = new vmCmnMenu_GF();
            vmCmnMenu objMenu = new vmCmnMenu();
            string    spQuery = string.Empty;

            try
            {
                Hashtable ht = new Hashtable();
                ht.Add("MenuID", id);
                spQuery = "[Get_CmnMenuSingle]";
                objMenu = GenericFactoryFor_Menu.ExecuteQuerySingle(spQuery, ht);
            }
            catch (Exception e)
            {
                e.ToString();
            }
            return(objMenu);
        }