public vmCmnModule GetCompanyByID(int?id) { vmCmnModule objModule = null; try { objModule = objModService.GetModuleByID(id); } catch (Exception e) { e.ToString(); } return(objModule); }
/// <summary> /// Get Data From Database /// <para>Use it when to retive single data through a stored procedure</para> /// </summary> public vmCmnModule GetModuleByID(int?id) { GenericFactoryFor_Module = new vmCmnModule_GF(); vmCmnModule objModule = null; string spQuery = string.Empty; try { Hashtable ht = new Hashtable(); ht.Add("ModuleID", id); spQuery = "[Get_CmnModuleSingle]"; objModule = GenericFactoryFor_Module.ExecuteQuerySingle(spQuery, ht); } catch (Exception e) { e.ToString(); } return(objModule); }