public DataSet SelectAll(ServiceMethods serviceMethod)
        {
            Database db = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING);
            DbCommand dbCommand = db.GetStoredProcCommand("usp_ServiceMethodsSelectAll");
            db.AddInParameter(dbCommand, "@CompanyId", DbType.Int32, serviceMethod.CompanyId);

            return db.ExecuteDataSet(dbCommand);
        }
        public bool IsDuplicateTypeName(ServiceMethods serviceMethod)
        {
            bool result = false;

            Database db = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING);
            DbCommand dbCommand = db.GetStoredProcCommand("usp_ServiceMethodsIsDuplicateServiceMethod");
            db.AddInParameter(dbCommand, "@CompanyId", DbType.Int32, serviceMethod.CompanyId);
            db.AddInParameter(dbCommand, "@ServiceMethodID", DbType.Int32, serviceMethod.ServiceMethodID);
            db.AddInParameter(dbCommand, "@ServiceMethod", DbType.String, serviceMethod.ServiceMethod);
            db.AddOutParameter(dbCommand, "@IsExist", DbType.Boolean, 1);

            db.ExecuteNonQuery(dbCommand);

            result = Convert.ToBoolean(db.GetParameterValue(dbCommand, "@IsExist").ToString());

            return result;
        }
        public bool IsDuplicateTypeName(ServiceMethods serviceMethod)
        {
            bool result = false;

            Database  db        = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING);
            DbCommand dbCommand = db.GetStoredProcCommand("usp_ServiceMethodsIsDuplicateServiceMethod");

            db.AddInParameter(dbCommand, "@CompanyId", DbType.Int32, serviceMethod.CompanyId);
            db.AddInParameter(dbCommand, "@ServiceMethodID", DbType.Int32, serviceMethod.ServiceMethodID);
            db.AddInParameter(dbCommand, "@ServiceMethod", DbType.String, serviceMethod.ServiceMethod);
            db.AddOutParameter(dbCommand, "@IsExist", DbType.Boolean, 1);

            db.ExecuteNonQuery(dbCommand);

            result = Convert.ToBoolean(db.GetParameterValue(dbCommand, "@IsExist").ToString());


            return(result);
        }